Delete multiple worksheets in multiple workbooks

BradA

Board Regular
Joined
Sep 24, 2010
Messages
75
I pull a report off of the bank's internal reporting software and end up with a list of about 500 loans. There are about a dozen account officers that are each responsible for some of the loans. What I ultimately want to do is to create a workbook for each officer, showing only that officer's accounts. Right now my code creates a separate worksheet in the original workbook for each officer, and then creates a new workbook for each of those worksheets, and saves it. The problem is that my code just names a copy of the workbook (with about 13 sheets) after each sheet name, but all of the other sheets are still in each book. So I'd like to be able to delete from (or not include in the first place) officer A's book all of the sheets with other officer's info, and from officer B's book delete all sheets that are not his, etc. Any help is appreciated. Thanks
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Since you already have a code, reply with the code. It may just need a few tweaks.

Just so my understanding is clear... you want code in the original workbook to create a new workbook for each officer and "copy" worksheets for respective officer. Do you want to keep the sheets in the original workbook intact?
 
Upvote 0
Saagar, Charlie, thanks to both of you. I was able to come up with a solution on my own. I appreciate your time.
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,254
Members
452,900
Latest member
LisaGo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top