I have written code to copy data from sheet "Data" (range A1 to last row in Col E) to sheet "classifications"
However , I get subscript out of range and the code below is highlighted in Yellow
Sheets("Classifications").Range("A1").PasteSpecial Paste:=xlPasteValues
See full code below
Sub Copy_Data()
Sheets("Classifications").UsedRange.ClearContents
With Sheets("Data")
Dim lr As Long
lr = .Range("A1:E" & .Rows.Count).End(xlUp).Row
.Copy
Sheets("Classifications").Range("A1").PasteSpecial Paste:=xlPasteValues
End With
Sheets("Classifications").UsedRange.EntireColumn.AutoFit
End Sub
it would be appreciated if someone could kindly assist me
Bookmarks