determine last row in any worksheet

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

mackie

anybody can help me how to determine which is the last row
or how to move the cell pointer to last row (not empty) of
the worksheet?

- i am getting lots of worksheets and i'd like to
determine right away the last row (not empty)

thanks a lot
 
thanks jason..
actually what i really want to do is..
lets say i received a worksheet with
1) rows up to 10
2) rows up to 100

i would like to create a macro that will position my cell
pointer to worksheets samples

1) A11
2) A101

thanks again
 
Mackie...

Pressing Ctrl...End will place the cursor at the last active cell i
any worksheet, then pressing Home will take you to the beginning cel
of that row. You should be able to create a macro that will do that, i
you think it is necessary
 
hello mackie,

to call it from a routine, you could adapt the following...


Code
-------------------
Sub getAddy()

Set LastRow = Range("A65536").End(xlUp)
MsgBox LastRow.Address() & " is the last cell in column A" & vbCrLf _
& "with data."

End Su
 
Man this topic comes up a lot!

Here's something I use:
Sheets("sheet_name_goes_here").Select ' Go to the sheet you want to check
MaxRowz = Range("A65536").End(xlUp).Row 'Start at the bottom and work up
to the first non-empty row

Now, MaxRowz will return the row number of the last POPULATED row. To get the
row BELOW it (the empty one) simply add the number one to is i.e. MaxRowz =
MaxRowz + 1
 
Back
Top