I have written the following code to copy data from row 1 to the last row containing data in Cols O, Q:U
However I get application defined or object defined error
It would be appreciated if someone could kindly amend my code
However I get application defined or object defined error
Code:
sheets(2).Range("O1:O", "Q:U" & LR).Copy Destination:=Sheets(3).Range("A1")
It would be appreciated if someone could kindly amend my code
Code:
Sub Copy_Sales_Values()
Sheets(2).Select
Dim LR As Long
LR = Range("A" & Rows.Count).End(xlUp).Row
Sheets(3).Select
Range("A1:K" & LR).ClearContents
Sheets(2).Range("O1:O", "Q:U" & LR).Copy Destination:=Sheets(3).Range("A1")
End Sub