SUMPRODUCT Formula returning #VALUE!

Robnrolla

New Member
Joined
Jul 16, 2017
Messages
13
Please can someone help me with this formula issue - =SUMPRODUCT((Table2[Department]=[@Department])*(Months=[@Month])*(Table2[[Month 1]:[Month 12]]))

Notes -

1) The Second Array is the Month dates which are outside and above data table 2.

2) The Third array is the 36 cells of data.

3) The dates are in custom format "MMM-YY" but are actually in date format behind the scenes i.e - 01/01/2018.

Data Table 1

MonthDepartmentAmount
Jan-18Warehouse#VALUE!

<tbody>
</tbody>

Data Table 2
Jan-18 Feb-18 Mar-18 Apr-18 May-18 Jun-18 Jul-18 Aug-18 Sep-18 Oct-18 Nov-18 Dec-18
DepartmentMonth 1Month 2Month 3Month 4Month 5Month 6Month 7Month 8Month 9Month 10Month 11Month 12
Warehouse444444444444
Warehouse111111111111
Warehouse777777777777

<tbody>
</tbody>

All the dimensions are correct to my knowledge so therefore i am not sure what the problem is.


Please can someone help me?

Thank you,
Rob
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Is the array MONTHS (named range) aligned with the headers Month 1, Month 2,...Month 12?
If so your formula should work.

M.
 
Last edited:
Upvote 0
Hello,

Yes everything is lined up which is why i cannot understand what is going on. can you upload MS Excel files? It is hard to show example in the thread as per above. Basically array 1 is from the 1st Warehouse to the 3rd warehouse in the department column. the second array is from Jan-18 too Dec-18 which are above Month 1-12 and the final array is the range which is Warehouse month 1=4 to Warehouse Month 12=7. Hope that makes sense?

thanks
 
Upvote 0
Worked for me. (months in Portuguese: fev-18 = feb-18; mai-18 = may-18; etc)
Named range Months: F1:Q1


A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
1
jan-18​
fev-18​
mar-18​
abr-18​
mai-18​
jun-18​
jul-18​
ago-18​
set-18​
out-18​
nov-18​
dez-18​
2
Month​
Department​
Amount​
Department​
Month 1​
Month 2​
Month 3​
Month 4​
Month 5​
Month 6​
Month 7​
Month 8​
Month 9​
Month 10​
Month 11​
Month 12​
3
jan-18​
Warehouse​
12​
Warehouse​
4​
4​
4​
4​
4​
4​
4​
4​
4​
4​
4​
4​
4
fev-18​
Warehouse​
22​
Warehouse​
1​
8​
1​
1​
1​
1​
1​
1​
1​
1​
1​
1​
5
Warehouse​
7​
10​
7​
7​
7​
7​
7​
7​
7​
7​
7​
7​
6

<tbody>
</tbody>


Formula in C3 (Table1)
=SUMPRODUCT((Table2[Department]=[@Department])*(Months=[@Month])*Table2[[Month 1]:[Month 12]])

M.
 
Last edited:
Upvote 0
So in the formula i am using if translated to your workings above would be: =SUMPRODUCT(($E$2:$E$5=$B$3)*($F$1:$Q$1=$A$3)*($F$3:$Q$5))

The dates are in 01/01/2018 but in custom "mmm-YY" format. Everything else is General. Really don't understand why it is not working? To re-iterate, the Dates above the Month 1- Month 12 are outside Table 2. This normally works for 2 array formula's based on single row range.

Thanks
 
Upvote 0
So in the formula i am using if translated to your workings above would be: =SUMPRODUCT(($E$2:$E$5=$B$3)*($F$1:$Q$1=$A$3)*($F$3:$Q$5))

You formula is not correct. It should be
=SUMPRODUCT(($E$3:$E$5=$B$3)*($F$1:$Q$1=$A$3)*($F$3:$Q$5))

M.
 
Upvote 0

Forum statistics

Threads
1,213,565
Messages
6,114,338
Members
448,569
Latest member
Honeymonster123

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