Want to get Array formula with Indirect to work

TomCon

Active Member
Joined
Mar 31, 2011
Messages
385
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
The following array formula works correctly:
=MAX((INDIRECT("R3"&"C66:R2533C66",FALSE)=BN4)*($BR$3:$BR$2533))-BR4

But, if i try to use the row() function, it gives #VALUE:
=MAX((INDIRECT("R"&ROW(BS3)&"C66:R2533C66",FALSE)=BN4)*($BR$3:$BR$2533))-BR4

Of course ROW(BS3) evaluates to "3", so, it might seem that the second would also work.

Is there any way to get this to work, to be able to use the row() function in the array formula, or can array formulas simply not be used in this way?

Thanks!
Tom
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Hi

What version of Excel are you using?

The formula compiles correctly for me in 2003 and 2007.

hth
 
Upvote 0
Try

=MAX((INDIRECT("R"&ROWS(A$1:A3)&"C66:R2533C66",FALSE)=BN4)*($BR$3:$BR$2533))-BR4

Not exactly sure why ROWS works, but ROW does not..
 
Upvote 0
Thanks for the Help/comments! I am using Excel 2010, so maybe they have a new bug or regression, if this worked before. For me, use of ROWS() will not solve my underlying problem; i must somewhere use ROW(). I tried some more combinations of solutions. If i put the =ROW() formula in a worksheet cell, i can then concatenate that cell into the INDIRECT() that is within the array formula. That can work for me, tho messy to have to leave those cells around on the sheet just to be referenced; would have prefered to compact it into the array formula. Thought "maybe a defined name would work" but once again, this fails in an array formula if the defined name contains ROW() within it. Even having the defined name be TEXT(ROW(...)) fails. So, only putting an expression that contains ROW() in a different cell seeems to work, from what i can see so far.

Thanks!
Tom
 
Upvote 0
For me, use of ROWS() will not solve my underlying problem; i must somewhere use ROW().

Why?

If it can be done with ROW, it can also be done with ROWS.
If anything, ROWS is better, because it will be robust against Row Insertion/Deletion.
 
Upvote 0
The following array formula works correctly:
=MAX((INDIRECT("R3"&"C66:R2533C66",FALSE)=BN4)*($BR$3:$BR$2533))-BR4

But, if i try to use the row() function, it gives #VALUE:
=MAX((INDIRECT("R"&ROW(BS3)&"C66:R2533C66",FALSE)=BN4)*($BR$3:$BR$2533))-BR4

Of course ROW(BS3) evaluates to "3", so, it might seem that the second would also work.

Is there any way to get this to work, to be able to use the row() function in the array formula, or can array formulas simply not be used in this way?

Thanks!
Tom
Why are you using cell reference BS3?

Try it like this:

...MAX(ROW(BS3))...
 
Upvote 0

Forum statistics

Threads
1,224,591
Messages
6,179,768
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top