Hi,
I am using the following code to stack multiple columns into one. Why is the macro getting stuck in the Second last line "Next"? I use Excel 2010.
Thank you.
I am using the following code to stack multiple columns into one. Why is the macro getting stuck in the Second last line "Next"? I use Excel 2010.
Thank you.
VBA Code:
Sub Stack_New()
Application.ScreenUpdating = False
Dim i As Long
Dim Lastrow As Long
Dim Lastrowa As Long
For i = 2 To 800
Lastrow = Cells(Rows.Count, "A").End(xlUp).Row + 1
Lastrowa = Cells(Rows.Count, i).End(xlUp).Row
Range(Cells(1, i), Cells(Lastrowa, i)).Copy Cells(Lastrow, 1)
Next
Application.ScreenUpdating = True
End Sub