The following code is working almost perfectly for what I want. The only problem I am having is that
the code selects the populated cells from Column 'O' across to Column 'V' inclusive. Can some explain
why does the code not pick up the remaining 4 populated columns that I need 'W - Z'.
Thank you all for your advice.
Private Sub CommandButton18_Click()
Dim Lastrow As Double
Dim LastCol As Double
LR = Cells(Rows.Count, "O").End(xlUp).Row
LastCol = Cells(12, Columns.Count).End(xlToLeft).Column
' Make the 12 above for any row you want that has lots of columns of data
Range(Cells(1, 15), Cells(LR, LastCol)).Cut
Range("B" & Cells.Rows.Count).End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub
Bookmarks