SumProduct within a date range

dbarbella

New Member
Joined
Jun 6, 2017
Messages
32
Hey Gang,
I'm pretty stuck on this one.

I have a well working SUMPRODUCT statement that effectively returns a total (much like a SUMIFs can), yet excludes certain instances based on checking for values from another area. This works perfectly:

=SUMPRODUCT(--(Expenses!$Q$3:$Q$99999=$D5),--ISNA(MATCH(Expenses!$C$3:$C$99999,'Employee Detail - Year to Date'!$J$3:$J$101,0)),Expenses!$H$3:$H$99999)

Where I can't seem to figure out a solution for is how to also constrain that within two dates
I have a starting date in cell i1 and an ending date in cell j1

How can I enhance the above formal to also include
Where
Only dates in tab Expenses!$C$3:$C$99999
Are
>=i1
AND
<=j1

I just can't figure out the syntax to make it work

Thanks so much for any help
-Dave
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Try:
Code:
[COLOR=#333333]=SUMPRODUCT(--(Expenses!$Q$3:$Q$99999=$D5),--ISNA(MATCH(Expenses!$C$3:$C$99999,'Employee Detail - Year to Date'!$J$3:$J$101,0)),[/COLOR][COLOR=#ff0000]--(Expenses!$C$3:$C$99999>=I1),--(Expenses!$C$3:$C$99999 <= J1<j1)< font="">[COLOR=#333333],[/COLOR][COLOR=#333333]Expenses!$H$3:$H$99999)[/COLOR]
</j1)<>[/COLOR]
 
Last edited:
Upvote 0
Try:
Code:
[COLOR=#333333]=SUMPRODUCT(--(Expenses!$Q$3:$Q$99999=$D5),--ISNA(MATCH(Expenses!$C$3:$C$99999,'Employee Detail - Year to Date'!$J$3:$J$101,0)),[/COLOR][COLOR=#ff0000]--(Expenses!$C$3:$C$99999>=I1),--(Expenses!$C$3:$C$99999 <= J1<j1)< font="">[COLOR=#333333],[/COLOR][COLOR=#333333]Expenses!$H$3:$H$99999)[/COLOR]</j1)<>[/COLOR]


Thanks so much for the sample
Gave it a try but returned a #VALUE ! error.
I thought it might a closing parenthesis after <= j1 (or spacing.
but it gave the same error with just using the first part --(Expenses!$C$3:$C$99999>=I1)

I Wonder why just inserting that small portion created a #VALUE ! Error

Here is what I dropped in:
Code:
=SUMPRODUCT(--(Expenses!$Q$3:$Q$91981=$D7),--ISNA(MATCH(Expenses!$C$3:$C$91981,'Employee Detail - Year to Date'!$J$3:$J$101,0)),--(Expenses!$C$3:$C$99999>=I1),Expenses!$H$3:$H$91981)[/CODE}
 
Upvote 0
In using SUMPRODUCT, all your ranges must be the same size!
It looks like you updated some, and that is now no longer the case, i.e.
Expenses!$Q$3:$Q$91981
Expenses!$C$3:$C$99999

 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,708
Messages
6,174,005
Members
452,542
Latest member
Bricklin

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