Need help with array for multiple values

JumboCactuar

Well-known Member
Joined
Nov 16, 2016
Messages
788
Office Version
  1. 365
Platform
  1. Windows
Hi,
i have this formula:

Code:
{=(INDEX($A$2:$F$30000,MATCH(1,($A$2:$A$30000=D2)*($B$2:$B$30000=B2),0),3))}

which outputs the value in the third column of range when the criteria matches.

However if the criteria has multiple matches i dont know how to output all these, ideally output in adjacent cells horizontally
Ive tried dragging the array across but this doesnt work

Appreciate any help
 
Last edited:

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Book1
ABCDEFGHI
21aA1AGMSY
32bB2BHNTZ
43aC3CIOU
51bD1DJPV
62aE2EKQW
73bF3FLRX
81aG1AGMSY
92bH2BHNTZ
103aI3CIOU
111bJ1DJPV
122aK2EKQW
133bL3FLRX
141aM1AGMSY
152bN2BHNTZ
163aO3CIOU
171bP1DJPV
182aQ2EKQW
193bR3FLRX
201aS1AGMSY
212bT2BHNTZ
223aU3CIOU
231bV1DJPV
242aW2EKQW
253bX3FLRX
261aY1AGMSY
272bZ2BHNTZ
Sheet1
Cell Formulas
RangeFormula
E2{=IFERROR(INDEX($C$2:$C$30000,SMALL(IF($A$2:$A$30000=$D2,IF($B$2:$B$30000=$B2,ROW($A$2:$A$30000)-ROW($A$2)+1)),COLUMNS($E$2:E$2))),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.


Copy formula in E2 across and down as necessary. Is that the kind of thing you're after?

WBD
 
Last edited:
Upvote 0
[TABLE="width: 85%"]
<tbody>[TR]
[TD]Array Formulas[TABLE="width: 100%"]
<tbody>[TR]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH]E2[/TH]
[TD="align: left"]{=IFERROR(INDEX($C$2:$C$30000,SMALL(IF($A$2:$A$30000=$D2,IF($B$2:$B$30000=$B2,ROW($A$2:$A$30000)-ROW($A$2)+1)),COLUMNS($E$2:E$2))),"")}[/TD]
[/TR]
</tbody>[/TABLE]
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself[/TD]
[/TR]
</tbody>[/TABLE]



Copy formula in E2 across and down as necessary. Is that the kind of thing you're after?

WBD

perfect it works thanks :)

only 1 thing, i have this also to get the row number
Code:
{=ROW(INDEX($A$2:$F$30000,MATCH(1,($A$2:$A$30000=D2)*($B$2:$B$30000=B2),0),3))}

but cant seem to add row into your formula
 
Last edited:
Upvote 0
Try like this?

Code:
{=IFERROR(ROW(INDEX($C$2:$C$30000,SMALL(IF($A$2:$A$30000=$D2,IF($B$2:$B$30000=$B2,ROW($A$2:$A$30000)-ROW($A$2)+1)),COLUMNS($E$2:E$2)))),"")}

WBD
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

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