Posted: 10/21/2016 5:46:16 AM EDT
|
I have a couple of excel files that have multiple tabs in it. I am talking like 30-40 tabs...
Is there away to easily (as in a one shot deal), break this file up so that each tab becomes a separate file ? I know about right clicking and copying to a new file, but I don't want to do that 30-40 times. |
|
Take a look at option 2 on this site: https://www.extendoffice.com/documents/excel/628-excel-split-workbook.html.
I've never used it personally. Hope it works! |
|
Yes. VBA.
Pseudocode: Sub make_workbooks() Dim ws as Worksheet Dim newwb as Workbook For each ws in thisworkbook.sheets Ws.copy Set newwb = activeworkbook newwb.saveas (save info here, I forget exactly what it is) Set newwb = nothing Next ws End sub This is off the cuff. I don't have excel in front of me to build it out. |
|
Quoted:
Tag for some vba when I get to the office. Here's some VBA code to do that for you. You'll need to use it in each workbook. Run the 'SplitWorkbookSheets' sub. @OP, you know how to use Excel's built in VBA?
|
Win a FREE Membership!
Sign up for the ARFCOM weekly newsletter and be entered to win a free ARFCOM membership. One new winner* is announced every week!
You will receive an email every Friday morning featuring the latest chatter from the hottest topics, breaking news surrounding legislation, as well as exclusive deals only available to ARFCOM email subscribers.