Please help with food inventory calculations!

ahh

New Member
Joined
Mar 26, 2011
Messages
1
I am working with a food inventory spreadsheet, and I need help coming up a function involving vlookup. I have a column entitled "food category" where each food is listed as "fruit", "vegetable",etc. then I have a column for the vendor price and a column for the units of food consumed per month. I want to calculate the cost of each "food category" per month. So, for instance, to calculate the "fruit" cost, I want excel to look in the food category column and check which items are fruits. For those that are, I want excel to multiply each fruit item's price times the amount consumed and then sum each fruit's cost. Can someone please help with the correct function?

Thanks in advance!
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Assuming the following:

Data ranging from row 1 to 25 for the example

Col A Month
Col B Food Category
Col C Price
Col D Units Consumed


Cell G2 Data Validation with months
Cell H2 Data Validation with Food Category

Cell G4:

=SUMPRODUCT(--(A2:A25=G2),--(B2:B25=H2),(C2:C25*D2:D25))

it will give you the total based on the criteria you will place in the data validation cells

George

I am working with a food inventory spreadsheet, and I need help coming up a function involving vlookup. I have a column entitled "food category" where each food is listed as "fruit", "vegetable",etc. then I have a column for the vendor price and a column for the units of food consumed per month. I want to calculate the cost of each "food category" per month. So, for instance, to calculate the "fruit" cost, I want excel to look in the food category column and check which items are fruits. For those that are, I want excel to multiply each fruit item's price times the amount consumed and then sum each fruit's cost. Can someone please help with the correct function?

Thanks in advance!
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,834
Members
452,947
Latest member
Gerry_F

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