determine last row

  • Thread starter Thread starter mackie
  • Start date Start date
M

mackie

thanks to all your help guys... you guys are great.

i still have one problem...

here's one particular sample
A B C D
xx xxxxx xxxx xxxx
xx xxxx xxxx

xxx xxxx xxxx
xxx xxxx xxxxx

given with sample above.. when i run it...
the pointer goes to a3 where it should be in a6
i need to determine the which is the last row as if im
using ctrl+end

thanks again
 
Hi

When user deletes/adds rows/columns, this will activate wrong cell until you
save the worksheet. The suggestion from Melanie Breden I did use was
Sheets("SheetName").Cells.Find("*", searchdirection:=xlPrevious).Row
to get last row with entries.

So maybe (on fly)
ActiveSheet.Cells(ActiveSheet.Cells.Find("*",
searchdirection:=xlPrevious).Row+1,1).Activate
will do?
 
Back
Top