Sumproduct with criteria in different sheets (rows & columns)

drluke

Active Member
Joined
Apr 17, 2014
Messages
314
Office Version
  1. 365
Platform
  1. Windows
I have 2 data worksheets:
Customers:


A
B
C
1
A001
J Smith
Address1
2
D325
R Brown
Address1
3
S589
P Day
Address1
<tbody> </tbody>

Sales


A
B
C
D
E
1
Customer
Jan-18
Feb-18
Mar-18
Apr-18
2
A001
200
300
200
900
3
S589




4
A001
500
100
600
1000
5
C522




<tbody> </tbody>


In my mastersheet I am trying to sum all the sales to A001 using SUMPRODUCT:
In my mastersheet col A contains the customer numbers, and B1:M1 the months of theyear. In B2 I have:
=SUMPRODUCT((‘Customers’!$A$1:$A$3=A1)*(‘Sales’!$B$1:$E$1=B1)*’Sales’!$B$2:$E$5)

The result Iget is #VALUE error. Any advice would beappreciated.


 

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.
I don't see that you need to reference the customer sheet at all. You're looking up by the customer number, which already exists on your Sales sheet. Try this formula in B2 of your master sheet:

=SUMPRODUCT((Sales!$A$2:$A$5=$A2)*(Sales!$B$1:$E$1=B$1)*Sales!$B$2:$E$5)
 
Upvote 0

Forum statistics

Threads
1,215,738
Messages
6,126,579
Members
449,319
Latest member
iaincmac

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