List generated from item selection

dhubz

New Member
Joined
Sep 10, 2014
Messages
48
Office Version
  1. 2016
Platform
  1. Windows
Hello everyone,
My Dad has a small catering business, they spend a lot of time hand writing lists, so I'm trying to help him out with a better solution. I am trying to create a list generator based on items selected on a main sheet. I have created 4 worksheets. This is just a small portion, I will be adding more items as I work through it. Ideally the final list generated only contains items with actual value, not all items.
1st worksheet is a listing of each item to be used in a drop down for selecting items on another worksheet.
Catering.xlsx
A
2Caesar Salad
3Macaroni Salad
4Garden Salad
5Potato Salad
Menu Item-datasource

2nd worksheet is a breakdown of the ingredients and quantity required(Min 50 people, goes up by 25)
Catering.xlsx
ABCDE
1Main ItemIngredient5075100
2Caeser SaladRomain Lettuce356
3Caeser SaladCroutons234
4Caeser SaladCaesar Dressing122
5Macaroni SaladElbow Pasta235
6Macaroni SaladMayo122
7Macaroni SaladOnion112
8Macaroni SaladPickle112
9Macaroni SaladCheese112
10Garden Salad
11Garden Salad
12Garden Salad
13Garden Salad
14Garden Salad
15Potato Salad
16Potato Salad
17Potato Salad
18Potato Salad
19Potato Salad
Ingredients

3rd is the will be the menu selection-drop down item selection
Catering.xlsx
ABCD
1# of People51
2
3Salad #1Caesar Salad
4Salad #2Macaroni Salad
5Salad #3
Menu Selection
Cells with Data Validation
CellAllowCriteria
B3:B5List='Menu Item-datasource'!$A$2:$A$5

4th is a generated list
Catering.xlsx
AB
1ItemQuantity
2
Grocery List

Based on the menu items selected on worksheet 3, I need to generate a shopping list of ingredients based on the item selected and the number of people. I've been trying ifs and vlookups. I'm thinking Index match might be better, but haven't really got a good understanding of that one yet. I'm guessing a VBA solution is probably best, but my skills there are more of a cut and paste, trial and error approach. This is my first post with the mini-sheet, so hopefully that is correct.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
which version of excel are you using? you can add it to your profile so others can better assist you.
 
Upvote 0
if you have 365, here's a possible solution not using vba
----------
Book1
A
1Caesar Salad
2Macaroni Salad
3Garden Salad
4Potato Salad
Menu Item-datasource

----------
Book1
ABCDE
1Main ItemIngredient5075100
2Caesar SaladRomain Lettuce356
3Caesar SaladCroutons234
4Caesar SaladCaesar Dressing122
5Macaroni SaladElbow Pasta235
6Macaroni SaladMayo122
7Macaroni SaladOnion112
8Macaroni SaladPickle112
9Macaroni SaladCheese112
10Garden Salad
11Garden Salad
12Garden Salad
13Garden Salad
14Garden Salad
15Potato Salad
16Potato Salad
17Potato Salad
18Potato Salad
19Potato Salad
Ingredients
Cells with Data Validation
CellAllowCriteria
A2:A19List='Menu Item-datasource'!$A$1:$A$4

----------
Book1
ABCD
1# of People51
2
3Salad #1Caesar Salad
4Salad #2Macaroni Salad
5Salad #3
Menu Selection
Cells with Data Validation
CellAllowCriteria
B3:B5List='Menu Item-datasource'!$A$1:$A$4

----------
Book1
AB
1ItemQuantity
2Romain Lettuce5
3Croutons3
4Caesar Dressing2
5Elbow Pasta3
6Mayo2
7Onion1
8Pickle1
9Cheese1
Grocery List
Cell Formulas
RangeFormula
A2:A9A2=TOCOL(FILTER(Ingredients!B2:B19,(Ingredients!A2:A19='Menu Selection'!B3)+(Ingredients!A2:A19='Menu Selection'!B4)+(Ingredients!A2:A19='Menu Selection'!B5),""),1)
B2:B9B2=INDEX(Ingredients!$C$2:$E$19, MATCH('Grocery List'!A2,Ingredients!$B$2:$B$19, 0), MATCH(CEILING('Menu Selection'!$D$1,25),Ingredients!$C$1:$E$1,0))
Dynamic array formulas.
 
Upvote 0
which version of excel are you using? you can add it to your profile so others can better assist you.
I'm using an older version(2016). I didn't see where to add it to my profile.
 
Upvote 0
I'm using an older version(2016)

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
if you have 365, here's a possible solution not using vba
----------
Book1
A
1Caesar Salad
2Macaroni Salad
3Garden Salad
4Potato Salad
Menu Item-datasource

----------
Book1
ABCDE
1Main ItemIngredient5075100
2Caesar SaladRomain Lettuce356
3Caesar SaladCroutons234
4Caesar SaladCaesar Dressing122
5Macaroni SaladElbow Pasta235
6Macaroni SaladMayo122
7Macaroni SaladOnion112
8Macaroni SaladPickle112
9Macaroni SaladCheese112
10Garden Salad
11Garden Salad
12Garden Salad
13Garden Salad
14Garden Salad
15Potato Salad
16Potato Salad
17Potato Salad
18Potato Salad
19Potato Salad
Ingredients
Cells with Data Validation
CellAllowCriteria
A2:A19List='Menu Item-datasource'!$A$1:$A$4

----------
Book1
ABCD
1# of People51
2
3Salad #1Caesar Salad
4Salad #2Macaroni Salad
5Salad #3
Menu Selection
Cells with Data Validation
CellAllowCriteria
B3:B5List='Menu Item-datasource'!$A$1:$A$4

----------
Book1
AB
1ItemQuantity
2Romain Lettuce5
3Croutons3
4Caesar Dressing2
5Elbow Pasta3
6Mayo2
7Onion1
8Pickle1
9Cheese1
Grocery List
Cell Formulas
RangeFormula
A2:A9A2=TOCOL(FILTER(Ingredients!B2:B19,(Ingredients!A2:A19='Menu Selection'!B3)+(Ingredients!A2:A19='Menu Selection'!B4)+(Ingredients!A2:A19='Menu Selection'!B5),""),1)
B2:B9B2=INDEX(Ingredients!$C$2:$E$19, MATCH('Grocery List'!A2,Ingredients!$B$2:$B$19, 0), MATCH(CEILING('Menu Selection'!$D$1,25),Ingredients!$C$1:$E$1,0))
Dynamic array formulas.
I've added a new Worksheet to Compile the data from all selected items, I can get the formulas to function but not if change the source list. See below, if the list is created from the Ingredients worksheet, it seems to populate correctly, but if the list is compiled from the Menu Selection worksheet it doesn't.


This works
Ingredients Sheet

Catering.xlsx
AB
1Main ItemIngredient
2Caeser SaladRomain Lettuce
3Caeser SaladCroutons
4Caeser SaladCaesar Dressing
5Macaroni SaladElbow Pasta
6Macaroni SaladMayo
7Macaroni SaladOnion
8Macaroni SaladPickle
9Macaroni SaladCheese
Ingredients


index match working sample.xlsx
ABCDEFGHIJK
1MainIngredient1Ingredient2Ingredient3Ingredient4Ingredient5Ingredient6Ingredient7Ingredient8Ingredient9Ingredient10
2Caeser SaladRomain LettuceCroutonsCaesar Dressing       
3Macaroni SaladElbow PastaMayoOnionPickleCheese     
Compiled Menu
Cell Formulas
RangeFormula
A2:A3A2=IFERROR(INDEX(Ingredients!$A$2:$A$12, MATCH(0, COUNTIF($A$1:A1, Ingredients!$A$2:$A$12), 0)),"")
B2:K2B2=IFERROR(INDEX(Ingredients!$B$2:$B$9,SMALL(IF($A$2=Ingredients!$A$2:$A$9,ROW(Ingredients!$A$2:$A$9)-ROW(Ingredients!$A$2)+1),COLUMN(A1))),"")
B3:K3B3=IFERROR(INDEX(Ingredients!$B$2:$B$9,SMALL(IF($A$3=Ingredients!$A$2:$A$9,ROW(Ingredients!$A$2:$A$9)-ROW(Ingredients!$A$2)+1),COLUMN(A1))),"")
Press CTRL+SHIFT+ENTER to enter array formulas.


This doesn't
Menu Selection Worksheet

Catering.xlsx
AB
1
2SALADS
3Salad #1Caesar Salad
4Salad #2
5Salad #3Garden Salad
6Veggie#1Baked Beans
7Veggie#2
8Veggie#3
9Veggie#4
10Veggie#5Broc and Cauli
Menu Selection
Cells with Data Validation
CellAllowCriteria
B3:B5List='Menu Item-datasource'!$A$6:$A$9
B6:B10List='Menu Item-datasource'!$A$11:$A$15

index match working sample.xlsx
ABCDEFGHIJK
1MainIngredient1Ingredient2Ingredient3Ingredient4Ingredient5Ingredient6Ingredient7Ingredient8Ingredient9Ingredient10
2Caesar Salad          
3Garden Salad          
Compiled Menu
Cell Formulas
RangeFormula
A2:A3A2=IFERROR(INDEX('Menu Selection'!B:B, SMALL(IF('Menu Selection'!B:B<>"", ROW('Menu Selection'!B:B)-MIN(ROW('Menu Selection'!B:B))+1), ROW(A1))), "")
B2:K2B2=IFERROR(INDEX(Ingredients!$B$2:$B$9,SMALL(IF($A$2=Ingredients!$A$2:$A$9,ROW(Ingredients!$A$2:$A$9)-ROW(Ingredients!$A$2)+1),COLUMN(A1))),"")
B3:K3B3=IFERROR(INDEX(Ingredients!$B$2:$B$9,SMALL(IF($A$3=Ingredients!$A$2:$A$9,ROW(Ingredients!$A$2:$A$9)-ROW(Ingredients!$A$2)+1),COLUMN(A1))),"")
Press CTRL+SHIFT+ENTER to enter array formulas.

Am I missing something?
 
Upvote 0
you're comparing "Caeser Salad" on the ingredients pg to "Caesar Salad" on the menu selection page.
fix this then should work
 
Upvote 0
Solution

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,631
Latest member
a_potato

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