Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Find last row with data
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find, Match data and paste data between two workbooks | Excel Discussion (Misc queries) | |||
Find formatting doesn't work: "Excel cannot find data" | Excel Discussion (Misc queries) | |||
Despite data existing in Excel 2002 spreadsheet Find doesn't find | Excel Discussion (Misc queries) | |||
The match and lookup functions can find literal data but not the same data referenced from a cell | Excel Discussion (Misc queries) | |||
FIND DATA WITHIN DATA (V-OR-H LOOKUP/FIND/MATCH?) | Excel Worksheet Functions |