Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Array reference in =ROWS() function

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??

--
Gary''s Student - gsnu200729
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Array reference in =ROWS() function

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)

Gary''s Student wrote:

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??

--
Gary''s Student - gsnu200729


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Array reference in =ROWS() function

Thank you Dave. I guess I need more coffee and less benadryl.
--
Gary''s Student - gsnu200729


"Dave Peterson" wrote:

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)

Gary''s Student wrote:

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??

--
Gary''s Student - gsnu200729


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I reference certain rows within array formulae? Crazy Pete Excel Worksheet Functions 11 June 13th 07 06:10 PM
function to reference all of pivottable data field array andrew Excel Worksheet Functions 0 February 22nd 06 05:54 PM
Cannot Reference "Array" in Subtotal Function Jhcorsair Excel Worksheet Functions 0 January 7th 06 11:28 PM
how do i reference multiple rows/columns with one function? NewUser13 New Users to Excel 1 March 4th 05 06:49 PM
how do i reference multiple rows/columns with one function? NewUser13 New Users to Excel 0 March 4th 05 06:45 PM


All times are GMT +1. The time now is 11:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"