Adding a condition to SUMPRODUCT

jack109

Board Regular
Joined
May 10, 2020
Messages
50
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I'm having difficulty in adding a condition to this formula:

=SUMPRODUCT($N$4:$N$2000,--(TEXT($B$4:$B$2000,"MMM")=AR5),--(TEXT($B$4:$B$2000,"YYYY")=TEXT(AS5,0)))

All I want to is add the condition that if AR2 is the range I5:I2000.

Im getting errors all the time. I thought it would have been something simple like this:

=SUMPRODUCT($N$4:$N$2000,--(TEXT($B$4:$B$2000,"MMM")=AR5),--(TEXT($B$4:$B$2000,"YYYY")=TEXT(AS5,0)),--(I5:I2000,$A$2)))

That doesn't work, so any help would be grateful as I'm sure that its a simple mistake I have made.

Cheers
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Try
Excel Formula:
--(I5:I2000=$A$2)
 
Upvote 0
Just getting a #Value. Formula works fine on its own, just cant add that extra bit to get it to work
 
Upvote 0
It should be I4 not I5, also do you want to compare that column to A2 or AR2?
 
Upvote 0
Got it to work, sorry didn't realise I had put typos in. Thanks for the help
 
Upvote 0
Glad you sorted it & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,639
Members
449,093
Latest member
Ahmad123098

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