Friday, April 08, 2005

Find 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

Comments: Post a Comment

Links to this post:

Create a Link



<< Home

This page is powered by Blogger. Isn't yours?