Return multiple values from a single selection

gruntingmonkey

Active Member
Joined
Mar 6, 2008
Messages
444
Office Version
  1. 365
Platform
  1. Windows
Not really sure how to phrase this question so apologies if I have not used the right terminology.

I'm looking to find out how to return multiple rows of information from a grid (can't be a table, this is a very small example of the data). Essentially, what is the formula to put in H4, H5 & H6 to bring up only Activities which have "Yes" under that persons name. In this example there is a maximum of 2 results but in the actual data it could be up to 10.

The name can be changed via a data validation cell - I know how to do that bit!

Thanks in advance.

1716399720329.png
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Are the names always in the exact order in your example?
 
Upvote 0
The names are examples. I want the calculation (which will only be in H4 (or H5 & H6 if needed to return multiple values)) to look up the name in Row 1 and then use the relevant Column to find the "Yes" fields and then return the activity in column A that it says Yes next to.

@hagia_sofia result gets a #calc! error and will only ever look in column B. There is also no way to look at the name as it doesn't reference the names in Row 1.
 
Upvote 0
Ah, my apologies, how about this then:

Excel Formula:
=FILTER($A$2:$A$8,INDEX($A$2:$E$8,,XMATCH(H$2,$A$1:$E$1))="Yes")
 
Upvote 1
If I were to add an additional column (now column A) for A new variation. would I be able to exclude anything that says "Online" in that column from the results?

Excel Formula:
=FILTER($B$2:$B$8,INDEX($B$2:$F$8,,XMATCH(I$2,$B$1:$F$1))="Yes")

1716473658519.png


I think that means having the index saying yes AND maybe a new filter into the equation?
 
Upvote 0
Try:

Excel Formula:
=FILTER($B$2:$B$8,($A$2:$A$8<>"Online")*(INDEX($A$2:$F$8,,XMATCH(I$2,$A$1:$F$1))="Yes"))
 
Upvote 1
Solution

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

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