How to return the values from a list while ignoring blanks?

stlpony

New Member
Joined
Mar 8, 2018
Messages
39
Hello!

Have a question ... Here is my table
[TABLE="width: 500"]
<tbody>[TR]
[TD]Christmas
[/TD]
[TD]EggNog[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Christmas[/TD]
[TD]Spaghetti[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Christmas[/TD]
[TD]Meatballs[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Thanksgiving[/TD]
[TD]Turkey[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Thanksgiving[/TD]
[TD]MashedPotatoes[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Holiday?[/TD]
[TD]Options?[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Thanksgiving[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="class: xl65, width: 64"]=IFERROR(INDEX($A$1:$B$5,MATCH(ROW()-ROW($A$8),$A$1:$A$5,0)),"")[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


I'm trying to make a simple survey ... If cell A8=Thanksgiving, I would like "Turkey" listed in cell B8, and Mashed Potatoes listed in B9. Thought I had the formula correct, but appears not ... Any idea??
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Try


Excel 2013/2016
AB
1ChristmasEggNog
2ChristmasSpaghetti
3ChristmasMeatballs
4ThanksgivingTurkey
5ThanksgivingMashedPotatoes
6
7Holiday?Options?
8ThanksgivingTurkey
9MashedPotatoes
Offer Received
Cell Formulas
RangeFormula
B8=IFERROR(INDEX($B$1:$B$5,AGGREGATE(15,6,(ROW($B$1:$B$5)-ROW($B$1)+1)/($A$1:$A$5=$A$8),ROWS($1:1))),"")
 
Upvote 0
[TABLE="width: 500"]
<tbody>[TR]
[TD]Holiday[/TD]
[TD]First Course[/TD]
[TD]Second Course[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Christmas[/TD]
[TD]EggNog[/TD]
[TD]Cookies[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Christmas[/TD]
[TD]EggNog[/TD]
[TD]Milk[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Christmas[/TD]
[TD]Spaghetti[/TD]
[TD]Bread[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Christmas[/TD]
[TD]Spaghetti[/TD]
[TD]Salad[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Christmas[/TD]
[TD]Meatballs[/TD]
[TD]Sauce[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Thanksgiving[/TD]
[TD]Turkey[/TD]
[TD]Corn[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Thanksgiving[/TD]
[TD]Turkey[/TD]
[TD]Veggies[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Thanksgiving[/TD]
[TD]MashedPotatoes[/TD]
[TD]Gravy[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Thanksgiving[/TD]
[TD]MashedPotatoes[/TD]
[TD]Stuffing[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Which Holiday?[/TD]
[TD]First Course Options?[/TD]
[TD]Second Course Options?[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Christmas[/TD]
[TD]EggNog[/TD]
[TD]Cookies[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]EggNog[/TD]
[TD]Milk[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Spaghetti[/TD]
[TD][TABLE="width: 142"]
<tbody>[TR]
[TD="class: xl65, width: 142"]=IFERROR(INDEX($C$2:$C$10,AGGREGATE(15,6,(ROW($C$2:$C$10)-ROW($C$2)+1)/($B$2:$B$10=$B15),ROWS($2:4))),"")[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Spaghetti[/TD]
[TD][TABLE="width: 142"]
<tbody>[TR]
[TD="class: xl65, width: 142"]=IFERROR(INDEX($C$2:$C$10,AGGREGATE(15,6,(ROW($C$2:$C$10)-ROW($C$2)+1)/($B$2:$B$10=$B15),ROWS($2:4))),"")[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Meatballs[/TD]
[TD][TABLE="width: 142"]
<tbody>[TR]
[TD="class: xl65, width: 142"]=IFERROR(INDEX($C$2:$C$10,AGGREGATE(15,6,(ROW($C$2:$C$10)-ROW($C$2)+1)/($B$2:$B$10=$B15),ROWS($2:4))),"")[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Dropdown #1 [/TD]
[TD]Dopdown #2 [/TD]
[TD]Dopdown #3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]



So, I'm trying to design a survey, by which DropDown #1 will show the holiday (either Christmas or Thanksgiving). If Christmas is selected, dropdown #2 will have EggNog, Spaghetti, or Meatballs. Depending on what is picked in #2 , the third option will show what is left based on the database up top.

Questions:
1) How do I make a dropdown that only shows the unique values in cells B13:B17?
2) My formula in Column C is not working ... If Spaghetti is selected, I want the options to show Bread or Salad ... So how do I add this third question / layer to my formula?

Thanks!
 
Upvote 0
This is now a completely different question, so you will need to start a new thread.
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,306
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