Home > Uncategorized > Find the last filled column

Find the last filled column

Hello All,

I was searching for something else at MrExcel.com but found this interesting bit of code. This code will give you the last filled column in a Sheet.

Public Sub find_last_column()
‘Found at MrExcel.com-solution given by Tom Urtis
Dim LC%
LC = Cells.Find(What:=”*”, After:=[A1], SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Column
MsgBox LC
End Sub
Categories: Uncategorized Tags:
  1. No comments yet.
  1. No trackbacks yet.