Return all Values Matching Another Cell's Value

nau2002

Board Regular
Joined
Dec 19, 2016
Messages
97
Hello, I'm trying to find a formula that will return a list of all cells matching the value of another cell. The 'Group' and 'Period' values in the first two rows are being selected via drop down menu.
So the result should be something like what begins in cell A4 and B4 in my table below. The 'Source' Data looks like what is shown in the data section beginning on row 8. The number of results to return will vary depending on which 'Group' is selected. Many thanks!
GroupNorth
PeriodQ1
Project A$400
Project D$212
Project F$900
GroupProject NameQ1Q2
NorthProject A400784
SouthProject B50045
WestProject C509300
NorthProject D212411
SouthProject E858222
NorthProject F900450

<tbody>
</tbody>
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Excel 2010
ABCD
1GroupSouth
2PeriodQ2
3
4Project B$45
5Project E$222
6  
7GroupProject NameQ1Q2
8NorthProject A400784
9SouthProject B50045
10WestProject C509300
11NorthProject D212411
12SouthProject E858222
13NorthProject F900450
Summary
Cell Formulas
RangeFormula
A4{=IFERROR(INDEX($B$8:$B$13,SMALL(IF($A$8:$A$13=$B$1,ROW($C$8:$C$13)),ROW(1:1))-7,1),"")}
A5{=IFERROR(INDEX($B$8:$B$13,SMALL(IF($A$8:$A$13=$B$1,ROW($C$8:$C$13)),ROW(2:2))-7,1),"")}
A6{=IFERROR(INDEX($B$8:$B$13,SMALL(IF($A$8:$A$13=$B$1,ROW($C$8:$C$13)),ROW(3:3))-7,1),"")}
B4{=IFERROR(INDEX(OFFSET($B$8:$B$13,0,MATCH($B$2,$C$7:$D$7,0)),SMALL(IF($A$8:$A$13=$B$1,ROW($C$8:$C$13)),ROW(1:1))-7,1),"")}
B5{=IFERROR(INDEX(OFFSET($B$8:$B$13,0,MATCH($B$2,$C$7:$D$7,0)),SMALL(IF($A$8:$A$13=$B$1,ROW($C$8:$C$13)),ROW(2:2))-7,1),"")}
B6{=IFERROR(INDEX(OFFSET($B$8:$B$13,0,MATCH($B$2,$C$7:$D$7,0)),SMALL(IF($A$8:$A$13=$B$1,ROW($C$8:$C$13)),ROW(3:3))-7,1),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
p.s. Welcome to the forum...

I think the formulas were cut off due to the length. These are array formulas, so after typing in (or pasting the formula), press [CTRL+SHIFT+ENTER].

A4 formula
=IFERROR(INDEX($B$8:$B$13,SMALL(IF($A$8:$A$13=$B$1,ROW($C$8:$C$13)),ROW(1:1))-7,1),"") Press [CTRL+SHIFT+ENTER]

B4 formula
=IFERROR(INDEX(OFFSET($B$8:$B$13,0,MATCH($B$2,$C$7:$D$7,0)),SMALL(IF($A$8:$A$13=$B$1,ROW($C$8:$C$13)),ROW(1:1))-7,1),"") Press [CTRL+SHIFT+ENTER]


​After entering the array formulas in row 4, you can drag those formulas down to row 6.
 
Last edited:
Upvote 0
Big thanks, this worked great!!
I have one other complexity to add...
For one of the Groups, 'West', I also want to include a sub group which is labeled as 'Southwest'. So, when 'West' is the selected Group, the results would include all projects for both 'West' and 'Southwest' (Project G could be 'Southwest' for example). I don't need any type of label or distinguisher on my results as to whether the project came from 'south' or 'southwest'.
 
Upvote 0

Forum statistics

Threads
1,214,987
Messages
6,122,618
Members
449,092
Latest member
amyap

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