ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   count of dishes that contain specific ingredients (https://www.excelbanter.com/excel-programming/405276-count-dishes-contain-specific-ingredients.html)

[email protected]

count of dishes that contain specific ingredients
 
Hi,

I have a table in excel where the first column is dishes and every
subsequent column is ingredients
------------------------------------------------------
dishes | ingredients | ingredients | ingredients
--------------------------------------------------------------------
dish 1 apple corn meat
dish 2 salt apple fish
dish 3 meat grain corn
dish x w y z
--------------------------------------------------------

I would like to translate the result into another excel file in the
following format:

item | # of dishes that is using ingredient | dish 1 | dish 2 | dish
3 | dish x
-----------------------------------------------------------------------------------------------------------
apple 2 x x
corn 2 x
x
salt 1 x
meat 2 x
x
fish 1 x

Is there a way to do this without using VBA code?

Thanks

:D

chelovik

count of dishes that contain specific ingredients
 
Hi
You could use an array formula to do this quite easily ... it would require
you have a list of the ingredients already built on another sheet or area of
your workbook ...
The formula would be something like this:
{=COUNT(IF($B$4:$D$6=A9,1))}
where B4:D6 is the area with the dishes ... and A9 is the ingredient (eg,
apple.)
I'll send you my workbook to have a look at ... if you don't get it, write
to me at
- Paul


" wrote:

Hi,

I have a table in excel where the first column is dishes and every
subsequent column is ingredients
------------------------------------------------------
dishes | ingredients | ingredients | ingredients
--------------------------------------------------------------------
dish 1 apple corn meat
dish 2 salt apple fish
dish 3 meat grain corn
dish x w y z
--------------------------------------------------------

I would like to translate the result into another excel file in the
following format:

item | # of dishes that is using ingredient | dish 1 | dish 2 | dish
3 | dish x
-----------------------------------------------------------------------------------------------------------
apple 2 x x
corn 2 x
x
salt 1 x
meat 2 x
x
fish 1 x

Is there a way to do this without using VBA code?

Thanks

:D



All times are GMT +1. The time now is 12:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com