Need Macro for "MultiTab.xls" --> "SingleTab.xlsx"

FKoenig

Board Regular
Joined
Jul 27, 2011
Messages
85
Hi,

I'm using an application which exports to XLS files. However, many times when I export, the # of rows is over 65,536 and therefore the app exports to multiple sheets. I need a macro which opens this .xls file and combines all of these multiple sheets onto a single sheet, then saves the file as .xlsx.

IE, the Macro would take rows 1 - 65,536 from "Sheet2, Sheet3, ...etc. [# of tabs is variable]", cut them, then paste them at the bottom of Sheet1. So if the original file contained sheets 1 through 3, each with 65,536 rows, then the "finished" file that gets saved would have 1 tab with (65,536*3 = ) 196,608 rows containing all of the data from the original 3 tax in the .xls files.


Any help would be greatly appreciated. I've searched the forums all over and can't seem to find this anywhere.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Some quick additional data.... Sheet 1 row 1 contains a header row (column/field names) Sheet2 and any other sheets above do not.

Also, the # of columns can change from time to time.
 
Upvote 0
Not exactly what I'm looking for as it first requires me to open the xls file and save it as xlsx in order to prevent the macro from running out of rows.... but I guess it's a starting place.

Thanks.
 
Upvote 0

Forum statistics

Threads
1,203,388
Messages
6,055,129
Members
444,763
Latest member
Jaapaap

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