I am trying to apply lastrow lastcolumn, but not getting it right.
I get the error "The extracted range has a missing or illegal field name"
Thanks
Sub CopyToOtherSheet1()
Dim lastRow As Long
Dim lastCol As Long
Dim colChr As String
With Sheets("360-Tableau")
lastCol = .Cells(2, .Columns.Count).End(xlToLeft).Column
lastRow = .Cells(.Rows.Count, lastCol).End(xlUp).Row
End With
Sheets("360-Tableau").Range(Cells(1, 1), Cells(lastRow, lastCol)).AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Sheets("360").Range("A1"), _
Unique:=False
Application.DisplayAlerts = False
Sheets("360-Tableau").Delete
Application.DisplayAlerts = True
End Sub
Bookmarks