Can't get last row number to work.

G

Guest

Forgive me for overlooking what I'm sure is obvious, but I'm completely stuck
(and more than a little frustrated). I am referencing data between
worksheets, so if my Dynamic range on sheet "A" ends on row 391, that is the
number I want to show up in sheet "B" (just the row number, not the column).

The following works, but it attaches the column number to the final info
=ADDRESS(MAX(IF(MyRange=MAX(MyRange),ROW(MyRange)*(MyRange<>""))),COLUMN(MyRange),4)

Previous posts for the same question showed formulas such as: lastRowNo =
Range("A65536").End(xlUp).Row
and
Cells(Rows.Count,"A").End(xlUp).Row
but it never works for me. (It says there is a problem with the forumla and
highligts the word "end"). I can only assume I'm looking at this to
literally, and something needs to be entered differently. Is this a formula,
a function, or a macro? How does this actually get entered?

thank you!!
 
C

Carim

Hi,

Give a try to the following :

LastRow = Cells(Cells.Rows.Count,"A").End(xlUp).Row

HTH
Cheers
Carim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top