Hello,
This is just a simple VBA code I made to import data from three tabs, and bring it all into one tab where work can then be done on the combined data.
This will normally run on data that runs about 18-30k rows per tab. I like the code, and feel that it is sufficient, but if anyone has any advice on how to make it better I am all ears. Definitely not an urgent post that I need answered, but if you have any suggestions to make it faster, or smarter, thanks.
This is just a simple VBA code I made to import data from three tabs, and bring it all into one tab where work can then be done on the combined data.
This will normally run on data that runs about 18-30k rows per tab. I like the code, and feel that it is sufficient, but if anyone has any advice on how to make it better I am all ears. Definitely not an urgent post that I need answered, but if you have any suggestions to make it faster, or smarter, thanks.
Code:
Dim B_Row1 As Long
Dim B_Row2 As Long
Private Sub BR1()
B_Row1 = Cells(Rows.Count, 1).End(xlUp).Row
End Sub
Private Sub BR2()
B_Row2 = Cells(Rows.Count, 1).End(xlUp).Row
End Sub
Sub Master_Finder()
Application.ScreenUpdating = False
Sheets("1").Activate
BR1
Range(Cells(1, 1), Cells(B_Row1, 2)).Copy Sheets("Test").Cells(2, 1)
Sheets("Test").Activate
BR2
Sheets("2").Activate
BR1
Range(Cells(1, 1), Cells(B_Row1, 2)).Copy Sheets("Test").Cells(B_Row2 + 1, 1)
Sheets("Test").Activate
BR2
Sheets("3").Activate
BR1
Range(Cells(1, 1), Cells(B_Row1, 2)).Copy Sheets("Test").Cells(B_Row2 + 1, 1)
Sheets("Test").Activate
ActiveWindow.ScrollRow = 1
Application.ScreenUpdating = True
End Sub
Last edited: