How to do a sum for multiple tables

Jessica553

New Member
Joined
Nov 21, 2021
Messages
24
Office Version
  1. 2010
Platform
  1. Windows
Hello, I am trying to figure out a formula to work out the cost of ingredients in different stores and then also look at the cost for the whole recipe at the same time. I have an example with really basic amounts in it just to give an idea.
I have built it with a really basic =(A1 * I1) + (A2 * I2) etc. But when it gets more complicated ie more ingredients, recipes etc and I need to update the prices in the stores or add in other ingredients like sprinkles etc I don't want to have to run that formula everytime for 10+ ingredients. Is there an easier way to set this up? I have looked at INDEX MATCH but don't know how to build that in with a sum etc. Thanks in advance for any help. Sorry I can't get the XL2BB to work.
 

Attachments

  • Ingredients example.png
    Ingredients example.png
    25.7 KB · Views: 8

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.
You can try this, but this requires your sumproduct table to have all ingredients in the same order.(I hope you understand that).
(You may need to enter the formula with the CSE entry (CNTL-SHFT-ENTR) method.)

Mr excel questions 60.xlsm
ABCDEFGHIJKL
1
2
3FlourButterMilkEggsFlourButterMilkEggs
4Woolworth's110.51.5Cake5212
5Coles1.510.491.49Brownie4111
6Slice3201
7CakeBrownie
8Woolworth's10.57
9Coles12.978.98
10
11
Jessica553
Cell Formulas
RangeFormula
B8:C9B8=SUMPRODUCT(INDEX($C$4:$F$5,MATCH($A8,$B$4:$B$5,0),0)*INDEX($I$4:$L$6,MATCH(B$7,$H$4:$H$6,0),0))
 
Upvote 1
Solution
in cell B8: =SUM( FILTER( $C$4:$F$5, $B$4:$B$5 = $B8) * FILTER( $I$4:$L$6, $H$4:$H$6 = C$7 ))
 
Upvote 0
@Scott R The OP's profile shows 2010 & therefore does not have the Filter function.
 
Upvote 0
You can try this, but this requires your sumproduct table to have all ingredients in the same order.(I hope you understand that).
(You may need to enter the formula with the CSE entry (CNTL-SHFT-ENTR) method.)

Mr excel questions 60.xlsm
ABCDEFGHIJKL
1
2
3FlourButterMilkEggsFlourButterMilkEggs
4Woolworth's110.51.5Cake5212
5Coles1.510.491.49Brownie4111
6Slice3201
7CakeBrownie
8Woolworth's10.57
9Coles12.978.98
10
11
Jessica553
Cell Formulas
RangeFormula
B8:C9B8=SUMPRODUCT(INDEX($C$4:$F$5,MATCH($A8,$B$4:$B$5,0),0)*INDEX($I$4:$L$6,MATCH(B$7,$H$4:$H$6,0),0))
You're amazing, that worked perfectly thank you so much!
 
Upvote 0
You're welcome. I am happy you found a solution!

Best Wishes!
 
Upvote 0

Forum statistics

Threads
1,215,071
Messages
6,122,963
Members
449,094
Latest member
Anshu121

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