LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 36
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find, Match data and paste data between two workbooks Chuckak Excel Discussion (Misc queries) 0 September 1st 06 06:59 PM
Find formatting doesn't work: "Excel cannot find data" Kasama Excel Discussion (Misc queries) 1 August 18th 06 01:40 PM
Despite data existing in Excel 2002 spreadsheet Find doesn't find AnnieB Excel Discussion (Misc queries) 1 June 16th 06 02:15 AM
The match and lookup functions can find literal data but not the same data referenced from a cell Jeff Melvaine Excel Discussion (Misc queries) 3 April 30th 05 01:29 PM
FIND DATA WITHIN DATA (V-OR-H LOOKUP/FIND/MATCH?) Jaladino Excel Worksheet Functions 0 February 22nd 05 11:22 PM


All times are GMT +1. The time now is 01:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"