help if and macros

marcelo2112

New Member
Joined
Dec 1, 2014
Messages
15
I got a list of clients that have food restriction like this:
ClientRestriction1Restriction2Restriction3Restriction4Restriction5
ZedRicePastaFishFried FoodApples
CharlesRiceFishFried Food
Carl

<tbody>
</tbody>
And a list of foods that I serve in my company like this:

Foodingredient1ingredient2ingredient3ingredient4ingredient5
Food1RicePastaFishFried FoodApples
Food2PastaMeatFried Food
food3Cheese

<tbody>
</tbody>


I wanted to know if is it possible to make a table for instance or of the number of people that cant eat food1 or food2, or what persons cant eat food1 or food2, or food3

Is a big emergency!!
Thanks for the help
 
Have you considered my solution which requires you to set up your data in a normalized database format that will allow for ease of matching the two tables. If this is going to get to be a large file of multiple restrictions and menus, I would seriously consider normalizing the data and explore using Access for the data base.
 
Upvote 0

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Hi
I have make the two normalized tables for the meals and the clients that I used their company number.
But I cant make the query, I dont know why.
I am working on MS office for mac 2011, but also have the office 2013 for windows.

I will send you a link with the workbook if you could see it if is ok and if you can help with the query, it would be great.
In the workbook there is also a table with an example of what results I need.
Thank you again!

https://www.dropbox.com/s/b3p50q4573muz1d/Alimentation_v2.xlsx?dl=0
 
Upvote 0
I have taken your file. I moved the restrictions table to a new sheet. I then applied a query to the two tables using MSQuery which is included in at least your 2013 version of Excel. I don't know MAC. I have exported the MS Query file and your file with the results showing which nrs in the restrictions table cannot eat the meals from the meal table.

Here is the link to both files. https://app.box.com/s/7zfp6oaohrxi1b054tvt
 
Upvote 0
Thank you!
This is what I want!
If I want to make any change I have work only with the excel or the database file?
Realy thanks for the support!


I have taken your file. I moved the restrictions table to a new sheet. I then applied a query to the two tables using MSQuery which is included in at least your 2013 version of Excel. I don't know MAC. I have exported the MS Query file and your file with the results showing which nrs in the restrictions table cannot eat the meals from the meal table.

Here is the link to both files. https://app.box.com/s/7zfp6oaohrxi1b054tvt
 
Upvote 0

Forum statistics

Threads
1,215,540
Messages
6,125,409
Members
449,223
Latest member
Narrian

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