how to use SUMPRODUCT with 2 arrays that are different in range size

Coffeetoday

New Member
Joined
Mar 26, 2017
Messages
2
Hello all!

New to MrExcel and hoping to get answer to my question

Have a monthly sales worksheet with the dates in top row and products in first column.

I the sample of the sheet below is clear.

What I am trying to do is figure out the use of "Type" on a daily basis.
To do that I have to multiply the QTY*Shots then add the result for each "Type".

After long search and using the SUMPRODUCT, I was able to get the following 2 formulas to work.
(To sum the QTY of specific Type for Mar 1
SUMPRODUCT((Sales!F190:CT190=A3)*(B2=Sales!C192:C282)*Sales!F192:CT282)

(To Sum the number of shots for the same specific type)
SUMPRODUCT((Sales!C192:C282=B2)*Sales!D192:D282)

However, when I combine them together as below, I get #VALUE! error
=SUMPRODUCT((Sales!F190:CT190=A3)*(Sales!C192:C282=B2)*Sales!F192:CT282,(Sales!C192:C282=B2)*Sales!D192:D282)

BCDEFGH
1-Mar-2017
ItemTypeShotsSPQuantityDiscountTotal
PRD1TD-112
PRD2TD-323
PRD3TD-411
PRD4TD-420
PRD5TD-124
PRD6TD-323

<tbody>
</tbody>


<tbody>
</tbody>

Please help!
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hello Coffeetoday, welcome to MrExcel

Does this work for you?

=SUMPRODUCT((Sales!F190:CT190=A3)*(B2=Sales!C192:C282)*Sales!D192:D282,Sales!F192:CT282)
 
Upvote 0

Forum statistics

Threads
1,213,559
Messages
6,114,302
Members
448,564
Latest member
ED38

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