I have data in various cols
I have written code to copy the data in Col j & Col L and to paste value in S1
I get a run time error-Application-defined or object-defined error
The following code is highlighted
See full code below
it would be appreciated if someone could kindly assist me
I have written code to copy the data in Col j & Col L and to paste value in S1
I get a run time error-Application-defined or object-defined error
The following code is highlighted
Code:
.Range("J1:J, L1:L" & lr).Copy
See full code below
Code:
Sub Copy_Unmatched_Data()
Dim lr As Long
With Sheets(1)
lr = .Range("A" & .Rows.Count).End(xlUp).Row
With Sheets(1)
.Range("J1:J, L1:L" & lr).Copy
.Range("S1").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End With
End With
Sheets(1).UsedRange.EntireColumn.AutoFit
End Sub
it would be appreciated if someone could kindly assist me
Last edited: