MartinSpellacy
New Member
- Joined
- Jun 6, 2018
- Messages
- 4
Afternoon,
I have tried recording the below macro which looks to combine the data on 9 tabs into one tab. Problem I have is that the data on each of the 9 tabs is dynamic and may vary in number of rows.
I believe I have identified the problem and have made the code bold and underlined.
Any help as to how this can work would be appreciated
Thanks
Martin
I have tried recording the below macro which looks to combine the data on 9 tabs into one tab. Problem I have is that the data on each of the 9 tabs is dynamic and may vary in number of rows.
I believe I have identified the problem and have made the code bold and underlined.
Any help as to how this can work would be appreciated
Thanks
Martin
Code:
Sheets("Ab").Select
Range("A2").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Combine").Select
Range("A2").Select
ActiveSheet.Paste
Sheets("Bh").Select
Range("A2").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Combine").Select
Range("A2").Select
Selection.End(xlDown).Select
[U][B] Range("A237").Select[/B][/U]
[U][B] ActiveSheet.Paste[/B][/U]
ActiveWindow.SmallScroll Down:=6
Sheets("Dm").Select
Range("A2").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Combine").Select
Range("A205").Select
Selection.End(xlDown).Select
[U][B] Range("A782").Select[/B][/U]
[U][B] ActiveSheet.Paste[/B][/U]
Sheets("Dd").Select
Range("A2").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Combine").Select
Range("A738").Select
Selection.End(xlDown).Select
Range("A995").Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=3
Sheets("Gg").Select
Range("A2").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Combine").Select
Range("A936").Select
Selection.End(xlDown).Select
Range("A1097").Select
ActiveSheet.Paste
Sheets("Gm").Select
Range("A2").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Combine").Select
Range("A1061").Select
Selection.End(xlDown).Select
Range("A1302").Select
ActiveSheet.Paste
Sheets("Inv").Select
Range("A11").Select
Selection.End(xlUp).Select
Range("A2").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Combine").Select
Range("A1272").Select
Selection.End(xlDown).Select
Range("A1774").Select
ActiveSheet.Paste
Sheets("Nb").Select
Range("A2").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Combine").Select
Range("A1715").Select
Selection.End(xlDown).Select
Range("A2246").Select
ActiveSheet.Paste
Sheets("VMU").Select
Range("A18").Select
ActiveWindow.SmallScroll Down:=-12
ActiveWindow.ScrollRow = 4
ActiveWindow.ScrollRow = 2
Range("A2").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Combine").Select
Range("A2208").Select
Selection.End(xlDown).Select
Range("A2718").Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=3
Last edited by a moderator: