Jeffreyxx01
Board Regular
- Joined
- Oct 23, 2017
- Messages
- 156
Hi guys,
can someone help to fix my macro?
Thanks,
can someone help to fix my macro?
Thanks,
Code:
Sub Trim_column()
Dim LastRow As Long
Dim Sht as Worksheet
Set Sht = ActiveWorkbook.Sheets("DataBase")
With Sht
LastRow = .Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
.Range("A2:A" & LastRow).value = Trim(Range(“A2:A” & LastRow).Value)
End With
End Sub
Last edited: