B
Brian Pollard
I would like to know the best way of find the row number of the last row
containg data in a worksheet.
Searching through newsgroups and web sites I found the first option (which
is commented out below)
but this is column specific i.e. it only works if the last used cell in the
worksheet is in column A.
My latest effort is the LROW line without the comment - but is this the best
or does anyone know a better or more efficient way?
Function LROW() As Long
' Returns the row number of the last row containing a non-blank entry in a
worksheet
Application.Volatile
' LROW = Range("a65536").End(xlUp).Row
LROW = Application.Caller.Parent.UsedRange.Rows.Count
End Function
containg data in a worksheet.
Searching through newsgroups and web sites I found the first option (which
is commented out below)
but this is column specific i.e. it only works if the last used cell in the
worksheet is in column A.
My latest effort is the LROW line without the comment - but is this the best
or does anyone know a better or more efficient way?
Function LROW() As Long
' Returns the row number of the last row containing a non-blank entry in a
worksheet
Application.Volatile
' LROW = Range("a65536").End(xlUp).Row
LROW = Application.Caller.Parent.UsedRange.Rows.Count
End Function