sumproduct by date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Here is the formula I tried.
=SUMPRODUCT(--(E3:E27=TODAY()),--(E3:E27=TODAY()-1),(H3:H27))
Column E has dates. Column H has the numbers to total. I need the total of
the numbers in Column H if the date is either today or yesterday. This
formula always returns a 0.
 
Your formula returns 0 because you are specifying that the date in col. E
equal today *and* yesterday. Try this instead:

=SUMPRODUCT(((E3:E27=TODAY())+(E3:E27=TODAY()-1))*(H3:H27))

or

=SUMPRODUCT(((E3:E27=TODAY())+(E3:E27=TODAY()-1)),H3:H27)

The "+" operator acts like OR.

HTH
Jason
Atlanta, GA
 
Thank you! That did it.
--
maryj


Jason Morin said:
Your formula returns 0 because you are specifying that the date in col. E
equal today *and* yesterday. Try this instead:

=SUMPRODUCT(((E3:E27=TODAY())+(E3:E27=TODAY()-1))*(H3:H27))

or

=SUMPRODUCT(((E3:E27=TODAY())+(E3:E27=TODAY()-1)),H3:H27)

The "+" operator acts like OR.

HTH
Jason
Atlanta, GA
 
Back
Top