find last row in a sheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

EndRow = Cells(Rows.Count, 1).End(xlUp)

I need the last used row count. This statement seems to count the last row
but not the used range. How do I find the last used row?


thanks,
 
EndRow = Cells(Rows.Count, 1).End(xlUp)

I need the last used row count. This statement seems to count the last row
but not the used range. How do I find the last used row?

thanks,

EndRow = Cells(65536,1).End(xlup).row

hth

Carlo
 
(e-mail address removed)...
Sorry didn't read the question properly, ignore my previous answer
modify Carlo's to read -- based on column 1 (Column A), it is
not based on what Excel considers to be the last cell.

EndRow = Cells(Rows.Count,1).End(xlup).row

You can read about lastcell at
http://www.mvps.org/dmcritchie/excel/lastcell.htm
 
Back
Top