Jeffreyxx01
Board Regular
- Joined
- Oct 23, 2017
- Messages
- 156
Hi guys,
I tried to make this macros but I get the red code highlited in yellow when I run it,
Do someone know why?
Thanks for the help
I tried to make this macros but I get the red code highlited in yellow when I run it,
Do someone know why?
Thanks for the help
Code:
Sub CopyData()
Dim LastRow As Long
Dim Sht As Worksheet
Worksheets("Datadump").Range("E:G,S:S,AW:AW,AY:AY,BE:BE,CC:CC,CF:CV").Copy
Set Sht = ThisWorkbook.Sheets("Clean")
With Worksheets("Clean")
[COLOR=#ff0000]LastRow = .Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row[/COLOR]
Sht.Range("A1:Y" & LastRow).ClearContents
.Range("A1").PasteSpecial xlPasteValues
End With
End Sub