Meth0dman27
New Member
- Joined
- May 6, 2018
- Messages
- 5
Hi All
I have a fairly tricky situation that I'm trying to solve that I'm not entirely sure is possible. I'll give a brief explanation below but if anyone wants to attempt it I can give a more detailed examples of the data.
I am trying to create a list that generates the items I need, in Sheet3, using data that is dispersed through sheets 1 and 2. Essentially I need a formula that will be able to do a "vlookup" based on multiple criteria but also be able to return multiple criteria. Further explanation below:
Sheet1 contains 3 pieces of relevant info: Recipe Code, Area, Recipe Type. In this instance, recipe type refers to protein, starch, veg, sauce, protein (halal). I am specifically looking for only non protein items, so I started my if stated with: =if(not(or(q2="Protein",q2="Protein (Halal)), ...... , .......)
Sheet2 Contains the breakdown of the recipe codes and shows the ingredients used via ingredient codes. Ingredient codes are what I'm trying to populated in sheet3. In this sheet, Column A is recipe code from sheet1, column B is ingredient code. Because each recipe has multiple ingredients it looks as such:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Recipe[/TD]
[TD]Ingredient Code[/TD]
[TD]Ingredient[/TD]
[/TR]
[TR]
[TD]2VE0001[/TD]
[TD]564[/TD]
[TD]Spinach[/TD]
[/TR]
[TR]
[TD]2VE0001[/TD]
[TD]215[/TD]
[TD]Mush[/TD]
[/TR]
[TR]
[TD]2VE0001[/TD]
[TD]669[/TD]
[TD]Butter[/TD]
[/TR]
[TR]
[TD]2VE0001[/TD]
[TD]293[/TD]
[TD]Oil[/TD]
[/TR]
[TR]
[TD]2VE0001[/TD]
[TD]584[/TD]
[TD]Salt[/TD]
[/TR]
</tbody>[/TABLE]
Because the "2VE0001" is on multiple lines a regular vlookup doesn't work as I may need to return multiple values
Sheet3 is where the data needs to be populated. This is also where another criteria I need to use comes into play. In this sheet I divide those ingredients further by "Area". So for example Area "Kit1" might have codes 2VE0001,2VE0002,2VE0003, and those 3 recipes might have 10 ingredients. I would need all 10 of those ingredients based on the area. Below is an example to give you an idea what I mean.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Area[/TD]
[TD]Ingredient Number[/TD]
[TD]Quantity[/TD]
[/TR]
[TR]
[TD]KIT1[/TD]
[TD]564[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]KIT1[/TD]
[TD]215[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]KIT1[/TD]
[TD]643[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]KIT2[/TD]
[TD]248[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]KIT2[/TD]
[TD]645[/TD]
[TD]50[/TD]
[/TR]
[TR]
[TD]KIT2[/TD]
[TD]215[/TD]
[TD]60[/TD]
[/TR]
</tbody>[/TABLE]
So essentially the info I need is column B on the last table, which are obtained from sheet 2 using criteria from sheets 1 & 3. I realize this is probably very confusing but any help you might have would be very much appreciated!
I have a fairly tricky situation that I'm trying to solve that I'm not entirely sure is possible. I'll give a brief explanation below but if anyone wants to attempt it I can give a more detailed examples of the data.
I am trying to create a list that generates the items I need, in Sheet3, using data that is dispersed through sheets 1 and 2. Essentially I need a formula that will be able to do a "vlookup" based on multiple criteria but also be able to return multiple criteria. Further explanation below:
Sheet1 contains 3 pieces of relevant info: Recipe Code, Area, Recipe Type. In this instance, recipe type refers to protein, starch, veg, sauce, protein (halal). I am specifically looking for only non protein items, so I started my if stated with: =if(not(or(q2="Protein",q2="Protein (Halal)), ...... , .......)
Sheet2 Contains the breakdown of the recipe codes and shows the ingredients used via ingredient codes. Ingredient codes are what I'm trying to populated in sheet3. In this sheet, Column A is recipe code from sheet1, column B is ingredient code. Because each recipe has multiple ingredients it looks as such:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Recipe[/TD]
[TD]Ingredient Code[/TD]
[TD]Ingredient[/TD]
[/TR]
[TR]
[TD]2VE0001[/TD]
[TD]564[/TD]
[TD]Spinach[/TD]
[/TR]
[TR]
[TD]2VE0001[/TD]
[TD]215[/TD]
[TD]Mush[/TD]
[/TR]
[TR]
[TD]2VE0001[/TD]
[TD]669[/TD]
[TD]Butter[/TD]
[/TR]
[TR]
[TD]2VE0001[/TD]
[TD]293[/TD]
[TD]Oil[/TD]
[/TR]
[TR]
[TD]2VE0001[/TD]
[TD]584[/TD]
[TD]Salt[/TD]
[/TR]
</tbody>[/TABLE]
Because the "2VE0001" is on multiple lines a regular vlookup doesn't work as I may need to return multiple values
Sheet3 is where the data needs to be populated. This is also where another criteria I need to use comes into play. In this sheet I divide those ingredients further by "Area". So for example Area "Kit1" might have codes 2VE0001,2VE0002,2VE0003, and those 3 recipes might have 10 ingredients. I would need all 10 of those ingredients based on the area. Below is an example to give you an idea what I mean.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Area[/TD]
[TD]Ingredient Number[/TD]
[TD]Quantity[/TD]
[/TR]
[TR]
[TD]KIT1[/TD]
[TD]564[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]KIT1[/TD]
[TD]215[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]KIT1[/TD]
[TD]643[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]KIT2[/TD]
[TD]248[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]KIT2[/TD]
[TD]645[/TD]
[TD]50[/TD]
[/TR]
[TR]
[TD]KIT2[/TD]
[TD]215[/TD]
[TD]60[/TD]
[/TR]
</tbody>[/TABLE]
So essentially the info I need is column B on the last table, which are obtained from sheet 2 using criteria from sheets 1 & 3. I realize this is probably very confusing but any help you might have would be very much appreciated!