Last cell with data
Try this:
Sub LastRow()
' Grab the current worksheet.
Dim shtCurrent As Worksheet
Set shtCurrent = ActiveSheet
' Grab the last cell in column 1 (A)
Dim rngLastCell As Range
Set rngLastCell = shtCurrent.UsedRange.Columns(1).Rows
(shtCurrent.UsedRange.Rows.Count)
' Select it.
rngLastCell.Select
End Sub
HTH
-----Original Message-----
Without looping through all the cells in a column, how
can I determine the last cell that has data in it for a
given column?
.
|