Macro to merge worksheets
Sorry, this isn't exactly what you want, but it is a step in the right
direction.
Sub CombineSheets()
Dim PasteRange As Range
Dim i As Long
Application.ScreenUpdating = False
Set PasteRange = Worksheets(1).Range("a65536") _
.End(xlUp).Offset(1, 0)
For i = 2 To Worksheets.Count
Worksheets(i).UsedRange.Copy PasteRange
Set PasteRange = Worksheets(1).Range("a65536") _
.End(xlUp).Offset(1, 0)
Next i
End Sub
This code will combine all pages into one page. I would create the tab
you want the data to be on, and run this macro from that tab. Problem
is, this will copy everything, including header rows. You can then
sort once the tabs are combined, and then delete the duplicate header
rows. Hope this helps!
|