Index Array returning 1 incorrect result

somliving

New Member
Joined
Aug 28, 2017
Messages
6
Good Morning,

I am trying to return multiple results based off 1 criteria. I have the following furmula:

=IFERROR(INDEX(Employees!$C$2:$D$10,SMALL(IF(Employees!$C$2:$C$10='Global Assumptions'!$Q$3,ROW(Employees!$C$2:$C$10)-MIN(ROW(Employees!$C:$C))+1),ROWS($A$1:$A1)),2),"")

The value in 'Global Assumptions'!$Q$3=200f

Employees!$C$2:$D$348 look as follows:[TABLE="width: 128"]
<colgroup><col width="64" span="2" style="width:48pt"></colgroup><tbody>[TR]
[TD="class: xl78, width: 64"][TABLE="width: 500"]
<tbody>[TR]
[TD]Property[/TD]
[TD]Name[/TD]
[/TR]
[TR]
[TD]200f[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="class: xl77, width: 64"]Bradley Himmelstein[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]200f[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="class: xl77, width: 64"]Patrick Mason[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]200f[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="class: xl77, width: 64"]Rimantas Samis[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]278m[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="class: xl77, width: 64"]Helen Buckley[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]278m[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="class: xl77, width: 64"]Pedro Lopez[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]510m[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="class: xl77, width: 64"]James Perez[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]510m[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="class: xl77, width: 64"]Albert Zuppe[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]510m[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="class: xl77, width: 64"]Steven Boddie[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]510m[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="class: xl77, width: 64"]Margaret Borer[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

[/TD]
[TD="class: xl78, width: 64"][/TD]
[/TR]
</tbody>[/TABLE]


With the formula:


=IFERROR(INDEX(Employees!$C$2:$D$10,SMALL(IF(Employees!$C$2:$C$10='Global Assumptions'!$Q$3,ROW(Employees!$C$2:$C$10)-MIN(ROW(Employees!$C:$C))+1),ROWS($A$1:$A1)),2),"")


I am currently getting the following results:

[TABLE="width: 136"]
<colgroup><col></colgroup><tbody>[TR]
[TD]Patrick Mason[/TD]
[/TR]
[TR]
[TD]Rimantas Samis[/TD]
[/TR]
[TR]
[TD]Helen Buckley [TABLE="width: 64"]
<tbody>[TR]
[TD="class: xl77, width: 64"][/TD]
[/TR]
</tbody>[/TABLE]



I am not expecting to get Helen Buckley back as a result because her property=278 M. I would be expecting to get back [TABLE="width: 64"]
<tbody>[TR]
[TD="class: xl77, width: 64"]Bradley Himmelstein

[/TD]
[/TR]
</tbody>[/TABLE]
but I am not. Please help![/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
This is the Row# argument in your index.
ROW(Employees!$C$2:$C$10)-MIN(ROW(Employees!$C:$C))+1
And it's evaluating to an array of {2,3,4,etc}

But you're indexing
Employees!$C$2:$D$10

The 2nd row in C2:D10 is 3.
You're offset by 1 row.

You need that to be an array beginning with 1 {1,2,3,etc}


What was the function of MIN(ROW(Employees!$C:$C)) ??
Try this as the row argument in the index
ROW(Employees!$C$2:$C$10)-ROW(Employees!$C$2)+1

=IFERROR(INDEX(Employees!$C$2:$D$10,SMALL(IF(Employees!$C$2:$C$10='Global Assumptions'!$Q$3,ROW(Employees!$C$2:$C$10)-ROW(Employees!$C$2)+1),ROWS($A$1:$A1)),2),"")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,305
Members
452,633
Latest member
DougMo

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