Counting Sandwich Orders!

budfox

New member
Joined
Jun 8, 2014
Messages
2
Reaction score
0
Points
0
Location
Somerset UK
Hi all, and please forgive me for joining just to post a single question. I've been working on something very high-end, as you can tell from the thread title. I've made my little spreadsheet do almost everything I need, but I'm stuck on this:

I want a cell to include all of the names from a column A who have chosen a certain selection from columns B, C and D.

This table should explain it:

NameFillingBreadButter
JohnCheeseBrownYes
PaulHamWhiteYes
GeorgeChickenWhiteNo
RingoCheeseBrownYes
DaveCheeseWhiteNo
MartinEggWhiteNo
PeteBaconBrownNo

So my first row in the 'order' sheet will read "Cheese on Brown with Butter" in the first column, and the second column will read "John, Ringo"

Obviously I'd then go on to make a row for every sandwich option, with the second column returning the names of those who have made that choice.

I hope that's explained well enough, and I really would appreciate a pointer as to the formula I'm trying to write. Until this point I've worked things out, and I can display nice list of orders, but the final "who ordered what" step has got me stumped :eek:hwell:

Many thanks for any help.

Steve
 

Bob Phillips

Super Moderator
Staff member
Joined
Mar 21, 2011
Messages
1,942
Reaction score
0
Points
36
Excel Version(s)
O365
Assuming that you have your orders in H2:J7, put this array formula in K2, copy down all rows and across as many columns as you think you might need

=IFERROR(INDEX($A$1:$A$8,SMALL(IF(($B$1:$B$8=$H2)*($C$1:$C$8=$I2)*($D$1:$D$8=$J2),ROW($A$1:$A$8)),COLUMN(A1))),"")
 

budfox

New member
Joined
Jun 8, 2014
Messages
2
Reaction score
0
Points
0
Location
Somerset UK
Thank you so much. I would never have worked that out in a million years. I shall however work through it so that I understand what's going on.
 
Top