01-31-2008 07:54 AM
01-31-2008 08:12 AM - edited 01-31-2008 08:14 AM
Function FindLastCell()Insert this function in your spreadsheet at a known location, then read the value. The value will indicated the number of rows that are populated before you hit the empty cell. You can edit the function for the appropriate column.
Dim LastCell As Range
With ActiveSheet
Set LastCell = .Cells(.Rows.Count, "A").End(xlUp)
If IsEmpty(LastCell) Then
'do nothing
Else
Set LastCell = LastCell.Offset(1, 0)
End If
End With
FindLastCell = LastCell.Row
End Function
01-31-2008 09:59 AM