SUMPRODUCT with multiple criteria and arrays

fishewb

New Member
Joined
Jun 3, 2019
Messages
19
1/1/20192/1/20193/1/20194/1/20195/1/20196/1/20197/1/2019
Product 10000000
Product 20000101
Product 30112000
Product 10000000
Product 20000000
Product 20000000
Product 10000000
Product 2011153220
Product 360454940624169

<colgroup><col width="64" span="8" style="width:48pt"> </colgroup><tbody>
</tbody>

Looking for help to get this SUMPRODUCT to work, using excel 2016

SUMPRODUCT((A2:A10="Product 1")*(A2:A10="Product 3")*(B1:H1=D1),B2:H10)

Thanks
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
ABCDEFGH
11/1/20192/1/20193/1/20194/1/20195/1/20196/1/20197/1/2019
2Product 10000000
3Product 20000101
4Product 30112000
5Product 10000000
6Product 20000000
7Product 20000000
8Product 10000000
9Product 2011153220
10Product 360454940624169

<tbody>
</tbody>

Looking for help to get this SUMPRODUCT to work, using excel 2016

SUMPRODUCT((A2:A10="Product 1")*(A2:A10="Product 3")*(B1:H1=D1),B2:H10)

Thanks

Sorry my table was incomplete. Added column and row references.
 
Upvote 0
Rather than supplying a formula that doesn't work, can you please explain (in words) what you are trying to do.
 
Upvote 0
Something like this


A
B
C
D
E
F
G
H
I
J
K
L
1
01/01/2019​
02/01/2019​
03/01/2019​
04/01/2019​
05/01/2019​
06/01/2019​
07/01/2019​
Products​
Date​
Result​
2
Product 1​
0​
0​
0​
0​
0​
0​
0​
Product 1​
03/01/2019​
50​
3
Product 2​
0​
0​
0​
0​
1​
0​
1​
Product 3​
4
Product 3​
0​
1​
1​
2​
0​
0​
0​
5
Product 1​
0​
0​
0​
0​
0​
0​
0​
6
Product 2​
0​
0​
0​
0​
0​
0​
0​
7
Product 2​
0​
0​
0​
0​
0​
0​
0​
8
Product 1​
0​
0​
0​
0​
0​
0​
0​
9
Product 2​
0​
1​
1​
1​
5​
32​
20​
10
Product 3​
60​
45​
49​
40​
62​
41​
69​

Criteria in columns J:K

Formula L2
=SUMPRODUCT(SUMIF(A$2:A$10,J$2:J$3,INDEX(B$2:H$10,0,MATCH(K2,B$1:H$1,0))))

M.
 
Upvote 0
Rather than supplying a formula that doesn't work, can you please explain (in words) what you are trying to do.

Apologies, I'm new to posting.

I am trying to write utilize a function that can find more than one criteria in the same "column A" and sum all of each criteria found based on a particular month in row 1. In this example I'm looking for all of "Product 3" and "Product 2" in "3/1/2019"
 
Upvote 0
Something like this


A
B
C
D
E
F
G
H
I
J
K
L
1
01/01/2019​
02/01/2019​
03/01/2019​
04/01/2019​
05/01/2019​
06/01/2019​
07/01/2019​
Products​
Date​
Result​
2
Product 1​
0​
0​
0​
0​
0​
0​
0​
Product 1​
03/01/2019​
50​
3
Product 2​
0​
0​
0​
0​
1​
0​
1​
Product 3​
4
Product 3​
0​
1​
1​
2​
0​
0​
0​
5
Product 1​
0​
0​
0​
0​
0​
0​
0​
6
Product 2​
0​
0​
0​
0​
0​
0​
0​
7
Product 2​
0​
0​
0​
0​
0​
0​
0​
8
Product 1​
0​
0​
0​
0​
0​
0​
0​
9
Product 2​
0​
1​
1​
1​
5​
32​
20​
10
Product 3​
60​
45​
49​
40​
62​
41​
69​

<tbody>
</tbody>


Criteria in columns J:K

Formula L2
=SUMPRODUCT(SUMIF(A$2:A$10,J$2:J$3,INDEX(B$2:H$10,0,MATCH(K2,B$1:H$1,0))))

M.

Thank you, this does work. Is it possible to simplify the functions and only use SUMPRODUCT?
 
Upvote 0
If you just want sumproduct, try


Excel 2013/2016
ABCDEFGHIJK
101/01/201901/02/201901/03/201901/04/201901/05/201901/06/201901/07/201901/03/2019
2Product 10000000Product 150
3Product 20000101Product 3
4Product 30112000
5Product 10000000
6Product 20000000
7Product 20000000
8Product 10000000
9Product 2011153220
10Product 360454940624169
Dashboard
Cell Formulas
RangeFormula
K2=SUMPRODUCT(((A2:A10=J2)+(A2:A10=J3))*(B1:H1=K1),B2:H10)
 
Upvote 0
Thank you, this does work. Is it possible to simplify the functions and only use SUMPRODUCT?

I believe the formula i've suggested should be faster (more efficient) than other that uses SUMPRODUCT only.

M.
 
Upvote 0
You're welcome, but as Marcelo has said, his formula is a better way of doing it.
 
Upvote 0

Forum statistics

Threads
1,215,218
Messages
6,123,676
Members
449,116
Latest member
HypnoFant

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