Consolidating multiple worksheets into one worksheet

Con

New Member
Joined
Nov 21, 2012
Messages
1
Hi,

I desperately need some help to append multiple sheets within a workbook into one master spreadsheet. I have tried the examples I have found in this forum but have not worked for me. I am very new to VBA and using macros and am using Excel 2003.

All sheets within the workbook have the same headings and format but the number of rows differ form sheet to sheet. The sheets are labeled as a series of numbers.

Any help would be greatly appreciated


Con
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Try this: - pls take note of the prerequites because I didn't know the file names in question.
Code:
Sub CopyWorksheets()
'http://www.mrexcel.com/forum/excel-questions/670730-consolidating-multiple-worksheets-into-one-worksheet.html
'Prerequisite. - Have workbook called Master Open.  Have the copy file open and active.
Dim xlSht As Excel.Worksheet
For Each xlSht In ActiveWorkbook.Worksheets
    Rownum = xlSht.UsedRange.Rows.Count
    xlSht.Range("A2:A" & Rownum).EntireRow.Copy
    Windows("master.xlsx").Activate
    Rownum1 = ActiveSheet.UsedRange.Rows.Count
    Range("A" & Rownum1 + 1).Select
    ActiveSheet.Paste
Next xlSht
End Sub

Let me knwo how you go.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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