Need help with SUMPRODUCTS to use 2-3 criteria

Akbarov

Active Member
Joined
Jun 30, 2018
Messages
347
Office Version
  1. 365
Platform
  1. Windows
Hello community,

I am trying to sum values in column E
If column C is September
Also column C 2022
Until month everything was working fine, but when I added 1 more criteria ( Year ) i get error. Can anyone help me please?

=SUMPRODUCT(Sheet2!$E$2:$E$3000,--( TEXT(Sheet2!$C$2:$C$3000,"MMMM")=Dashboard!$K$2),--(YEAR (Sheet2!$C$2:$C$3000)=M2))
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Excel Formula:
=SUMPRODUCT(Sheet2!$E$2:$E$3000,--(TEXT(Sheet2!$C$2:$C$3000,"MMMM")=Dashboard!$K$2)*(YEAR (Sheet2!$C$2:$C$3000)=$M$2))

But would recommend using SUMIFS that is far more stable, if you have to bring up a column total based on multiple criteria
 
Upvote 0
The issue I see with the original formula is an extra space between YEAR and ( needs to be deleted.
 
Upvote 0
Solution
=SUMPRODUCT(Sheet2!$E$2:$E$3000,--( TEXT(Sheet2!$C$2:$C$3000,"MMMM")=Dashboard!$K$2),--(YEAR (Sheet2!$C$2:$C$3000)=M2))

What sheet is the red M2 above on? I'm guessing it might be on 'Dashboard' like the K2?
.. and that would mean that this formula is also on sheet 'Dashboard'?

If my guesses are correct, what about the shorter ..
Excel Formula:
=SUMPRODUCT(Sheet2!$E$2:$E$3000,--( TEXT(Sheet2!$C$2:$C$3000,"MMMMYYYY")=$K$2&M2))
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,279
Members
449,075
Latest member
staticfluids

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