Array reference in =ROWS() function

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

Guest

I enter:

=ROWS(2:$80)

and copy it down. I get:

=ROWS(2:$80)
=ROWS(3:$80)
=ROWS(4:$80)
=ROWS(5:$80)
=ROWS(6:$80)

and see:

79
78
77
76
75

This is O.K. I want to put $80 in E1 and use the cell reference instead.
Both:

=rows(2:E1)
and
=rows(2:indirect(E1))
fail.

What is the correct syntax??
 
I think you'd want something like:
=ROWS(INDIRECT("2:"&$E$1))
but this will fail when you drag it down.

With the formula in A1, you could use:
=ROWS(INDIRECT(ROW()+1&":"&$E$1))

or more simply
=$e$1-row()

(but put 80 in E1--not $80)
 

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

Back
Top