Hi
I am working round deleting all the columns following the last filled cell in row 1
I have the following code but I am stuck:
Sub DeleteColumns()
Dim LastCol As Range
Dim LastColCellNumber As Long
With ActiveSheet
Set LastCol = .Cells(.Columns.Count, 1).End(xlToLeft)
Columns(LastColCellNumber + 1 & ":" & Columns.Count).Delete
End With
End Sub
Any help appreciated
Thanks
I am working round deleting all the columns following the last filled cell in row 1
I have the following code but I am stuck:
Sub DeleteColumns()
Dim LastCol As Range
Dim LastColCellNumber As Long
With ActiveSheet
Set LastCol = .Cells(.Columns.Count, 1).End(xlToLeft)
Columns(LastColCellNumber + 1 & ":" & Columns.Count).Delete
End With
End Sub
Any help appreciated
Thanks