sumproduct two tables, multiple conditions

nileshp

New Member
Joined
Oct 29, 2008
Messages
19
I have a products table with raw material proportions. 2nd table with raw material rates.

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Product name[/TD]
[TD]RM names[/TD]
[TD]%age[/TD]
[/TR]
[TR]
[TD]Product1[/TD]
[TD]RM2[/TD]
[TD]49%[/TD]
[/TR]
[TR]
[TD]Product1[/TD]
[TD]RM3[/TD]
[TD]51%[/TD]
[/TR]
[TR]
[TD]Product2[/TD]
[TD]RM1[/TD]
[TD]30%[/TD]
[/TR]
[TR]
[TD]Product2[/TD]
[TD]RM3[/TD]
[TD]50%[/TD]
[/TR]
[TR]
[TD]Product2[/TD]
[TD]RM2[/TD]
[TD]20%[/TD]
[/TR]
</tbody>[/TABLE]

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Date[/TD]
[TD]RM names[/TD]
[TD]Rate[/TD]
[/TR]
[TR]
[TD]01-04-2017[/TD]
[TD]RM1[/TD]
[TD]100[/TD]
[/TR]
[TR]
[TD]01-04-2017[/TD]
[TD]RM2[/TD]
[TD]50[/TD]
[/TR]
[TR]
[TD]01-04-2017[/TD]
[TD]RM3[/TD]
[TD]70[/TD]
[/TR]
[TR]
[TD]01-05-2017[/TD]
[TD]RM1[/TD]
[TD]110[/TD]
[/TR]
[TR]
[TD]01-05-2017[/TD]
[TD]RM2[/TD]
[TD]45[/TD]
[/TR]
[TR]
[TD]01-05-2017[/TD]
[TD]RM3[/TD]
[TD]75[/TD]
[/TR]
</tbody>[/TABLE]

Not all RM is used in all products. I want to get product cost by multiply rates to %age for given product and date.

Thanks for reading

Nilesh
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Try this, copied down.

00 Old HTML Conversions 2020-04-08 1.xlsm
ABCDEFG
1Product nameRM names%ageProductDateCost
2Product1RM249%Product21/04/201775
3Product1RM351%Product11/04/201760.2
4Product2RM130%Product21/05/201779.5
5Product2RM350%Product11/05/201760.3
6Product2RM220%
7
8DateRM namesRate
91/04/2017RM1100
101/04/2017RM250
111/04/2017RM370
121/05/2017RM1110
131/05/2017RM245
141/05/2017RM375
two tables multiple conditions
Cell Formulas
RangeFormula
G2:G5G2=SUMPRODUCT(SUMIFS(C$9:C$14,B$9:B$14,B$2:B$6,A$9:A$14,F2),--(A$2:A$6=E2),C$2:C$6)
 
Last edited:
Upvote 0
Try this, copied down.

Hi Peter,
Your answer seems to be rendering as HTML code instead of text. Is there a way to adjust that? I think your answer to NilesHp may be the solution I'm looking for on my problem.
Thanks!
Aaron
 
Last edited by a moderator:
Upvote 0
That's due to the migration to the new software, which does not allow HTML. There are plans to deal with it, but will take some time.
In the mean time it looks like the formula is
SUMIFS(C$9:C$14,B$9:B$14,B$2:B$6,A$9:A$14,F2),--(A$2:A$6=E2),C$2:C$6)
 
Upvote 0
That's due to the migration to the new software, which does not allow HTML. There are plans to deal with it, but will take some time.
In the mean time it looks like the formula is
SUMIFS(C$9:C$14,B$9:B$14,B$2:B$6,A$9:A$14,F2),--(A$2:A$6=E2),C$2:C$6)

Thanks so much. Did the ranges in the formula refer to an Excel table that had been attached. Or are they referencing how the original post is laid out above?
 
Upvote 0
I think it was actually like this.

A_MrExcel.xlsm
ABCDEFG
1Product nameRM names%ageProductDateCost
2Product1RM249%Product21/04/201775
3Product1RM351%Product11/04/201760.2
4Product2RM130%Product21/05/201779.5
5Product2RM350%Product11/05/201760.3
6Product2RM220%
7
8DateRM namesRate
91/04/2017RM1100
101/04/2017RM250
111/04/2017RM370
121/05/2017RM1110
131/05/2017RM245
141/05/2017RM375
Sumproduct
Cell Formulas
RangeFormula
G2:G5G2=SUMPRODUCT(SUMIFS(C$9:C$14,B$9:B$14,B$2:B$6,A$9:A$14,F2),--(A$2:A$6=E2),C$2:C$6)
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,335
Members
452,636
Latest member
laura12345

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