SUMPRODUCT and SUMIFS with multiple criteria in multiple rows

avensis1

New Member
Joined
Feb 24, 2017
Messages
3
Hi,

I have the data as in the table 1 below. I then want to create a table where one can write in make, type, year and then get the summarized price for this combo of cars, see table 2. I'm having problems to get the formula working.. What I have done is the following in cell B2 in Table 2

=SUMPRODUCT(SUMIFS(Table1!E:E;Table1!B:B;Table2!C2:D2;Table1!C:C;Table2!E2:F2;Table1!D:D;Table2!G2:H2))

However, this does not work. It seems to be that I need to have the criteria data in rows and columns respectively, but I see two problems here...

1.
I have it in rows, and for outstanding reasons, I will have to have them in rows

2.
I do have three sets of multiple criteria - but it seems like SUMPRODUCT is 2-dimensional, i.e. I can not have a third dimension of data like I have.

So, smart and helpful people out there - what can I do?

Thanks!



Table 1
--------------------------------------------


ABCDE
1MAKETYPEYEARPRICE
2FordSmall201310000
3FordMedium201415000
4FordLarge201520000
5ToyotaSmall20135000
6ToyotaMedium201410000
7ToyotaLarge201515000
8NissanSmall20137000
9NissanMedium201412000
10NissanLarge201517000

<tbody>
</tbody>

















Table 2
--------------------------------------------

ABCDEFGH
1TOTAL PRICEMAKE 1MAKE 2TYPE 1TYPE 2YEAR 1YEAR 2
2WHAT FORMULA HERE????FordNissanMediumLarge20132015
3
4

<tbody>
</tbody>
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Hi, welcome to the forum!

You can try like this:


Excel 2013
BCDEFGH
1TOTAL PRICEMAKE 1MAKE 2TYPE 1TYPE 2YEAR 1YEAR 2
237000FordNissanMediumLarge20132015
Sheet2
Cell Formulas
RangeFormula
B2=SUMPRODUCT(Table1!$D$2:$D$100,(Table1!$A$2:$A$100=C2)+(Table1!$A$2:$A$100=D2),(Table1!$B$2:$B$100=E2)+(Table1!$B$2:$B$100=F2),(Table1!$C$2:$C$100=G2)+(Table1!$C$2:$C$100=H2))




Excel 2013
ABCD
1MAKETYPEYEARPRICE
2FordSmall201310000
3FordMedium201415000
4FordLarge201520000
5ToyotaSmall20135000
6ToyotaMedium201410000
7ToyotaLarge201515000
8NissanSmall20137000
9NissanMedium201412000
10NissanLarge201517000
Table1
 
Upvote 0
Thanks, this seem to work just fine in this case. However, I have some problems when transferring to my real-world case, which in principle is built up the same way.

Does this solution have limitations on that each Make/Type etc needs to only have two values selected (in my case Ford & Nissan / Medium & Large / 2013 & 2014)? Or could I extend the selection to include e.g. also 2015?
 
Upvote 0
Or could I extend the selection to include e.g. also 2015?

Hi, you can extend it, for example, where I2 contains the third year condition:

Rich (BB code):
=SUMPRODUCT(Table1!$D$2:$D$100,(Table1!$A$2:$A$100=C2)+(Table1!$A$2:$A$100=D2),(Table1!$B$2:$B$100=E2)+(Table1!$B$2:$B$100=F2),(Table1!$C$2:$C$100=G2)+(Table1!$C$2:$C$100=H2)+(Table1!$C$2:$C$100=I2))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,863
Messages
6,121,978
Members
449,058
Latest member
oculus

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