Return Multiple Results for a Single Match

MibuKotarou

New Member
Joined
Jul 26, 2012
Messages
17
Hello MrExcel forum,

I am trying to figure out a formula I can use to return a series of cells for only a single match query. I have a series of yes or no questions that have a value attached to them. I want to search the array for instances of "Yes" and then return the values two columns over but the catch is I need the values all in the same cell.

YesExist?Apple
YesExist?Banana
Exist?Ghost
YesExist?Horse
Exist?Vampire

<tbody>
</tbody>

I would like it to return Apple. Banana. Horse.

Help me MrExcel Forum You are My Only Hope.

Thank You
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
You may be able to define a range object and then use a "For each "Yes" in range" loop and return the cooresponding item in the third column. You would then need a string concatenation something like theText = theText & [column 3 data] & " " which must be inside the loop.
 
Upvote 0
Hi,

Based on a layout as follows:

Excel 2012
ABCDE
1QuestionPresent?ThingResult
2YesExist?AppleApple
3YesExist?BananaBanana
4Exist?GhostHorse
5YesExist?Horse
6Exist?Vampire

<tbody>
</tbody>
Sheet1
E2, copied down:

Code:
=IFERROR(INDEX(C$2:C$6,SMALL(IF(A$2:A$6="Yes",ROW(C$2:C$6)-ROW(C$2)+1),ROWS(E$2:E2))),"")

Array entered, i.e. with CTRL+SHIFT+ENTER, before dragging down.

Matty
 
Upvote 0
Hi,

Thanks for your help. I am having an issue with the IF statement. It is saying that A$2:A$6="Yes" is not valid and causing an error in the formula which then only shows the First result in E2 and nothing in the later fields.
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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