sumproduct between two dates

C

chased

I have a Date column, a percentage column, and a balance column. I want to
add all balances between a specific date to 30 days after that date and all
balances between those dates above a certain percentage.

Date Pctg. Balance
7/15/05 50% 10000
7/29/05 75% 15000
7/31/05 75% 15544
8/08/05 50% 12344

I want the formula to review from 7/15/05 to 8/15/05 and everything above
50% and add the balances that qualify.
 
G

Guest

Hi

Try something like:
=SUMPRODUCT(--(A2:A50>DATE(07,15,2005))*(A2:A50>DATE(07,15,2005))*(B2:B50>0.5),(C2:C50))

Andy.
 
G

Guest

Sorry, got it wrong! Try this:
=SUMPRODUCT(--(A2:A50>=DATE(07,15,2005))*(A2:A50<=DATE(08,15,2005))*(B2:B50>0.5),(C2:C50))

Andy.
 
B

Bob Phillips

=SUMPRODUCT(--(A2:A20>=--"2005-07-20"),--(A2:A20<=--"2005-7-20"+30),--(B2:B2
0>50%),C2:C20)
 
C

chased

Thank you very much!! Both formulas worked.

Bob Phillips said:
=SUMPRODUCT(--(A2:A20>=--"2005-07-20"),--(A2:A20<=--"2005-7-20"+30),--(B2:B2
0>50%),C2:C20)
 
Top