G
Guest
I have used the following for a while:
Function lcell(col As Integer) As Long
Dim lastcell As Range
Set lastcell = Cells(Rows.Count, col).End(xlUp)
lcell = lastcell.Row
End Function
=lcell(1) is supposed to return the row number of the last used cell in
column A. Today I discovered the code ignores row 65536; so if A65536 is
occupied, another cell in column A is being returned.
Why?
Function lcell(col As Integer) As Long
Dim lastcell As Range
Set lastcell = Cells(Rows.Count, col).End(xlUp)
lcell = lastcell.Row
End Function
=lcell(1) is supposed to return the row number of the last used cell in
column A. Today I discovered the code ignores row 65536; so if A65536 is
occupied, another cell in column A is being returned.
Why?