G
Gene Augustin
MAC Powerbook G4, OS 10.5.6, Excel 2004
I have a worksheet with a column with first cell value in column DATE,, then
a bunch of rows in that column with either a date or an empty cell. I'm
trying to find the last cell with a date in that column.
I've tried all of the following, none works. Using the immediate window,
Lastcell is always 1 and xlUP is -4162 after execution. Can you suggest a
proper code?
Sub LastRowWithDate()
'Find Last row with date
'LastRow = Cells(65536, 1).End(xlUp).Row
'LastRow = Cells(65536,1).End(xlUp).Row
'LastRow = .Cells(.Rows.Count, "K").End(xlUp).Row
LastRow = Cells(Cells.Rows.Count).End(xlUp).Row
End Sub
Gene
I have a worksheet with a column with first cell value in column DATE,, then
a bunch of rows in that column with either a date or an empty cell. I'm
trying to find the last cell with a date in that column.
I've tried all of the following, none works. Using the immediate window,
Lastcell is always 1 and xlUP is -4162 after execution. Can you suggest a
proper code?
Sub LastRowWithDate()
'Find Last row with date
'LastRow = Cells(65536, 1).End(xlUp).Row
'LastRow = Cells(65536,1).End(xlUp).Row
'LastRow = .Cells(.Rows.Count, "K").End(xlUp).Row
LastRow = Cells(Cells.Rows.Count).End(xlUp).Row
End Sub
Gene