Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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. -- maryj |
#2
![]() |
|||
|
|||
![]()
Try:
=SUMPRODUCT(--(E3:E27=(TODAY()-1)),(H3:H27)) "maryj" wrote: 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. -- maryj |
#3
![]() |
|||
|
|||
![]()
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 "maryj" wrote: 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. -- maryj |
#4
![]() |
|||
|
|||
![]()
Thank you! That did it.
-- maryj "Jason Morin" wrote: 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 "maryj" wrote: 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. -- maryj |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sumproduct with Date column | Excel Worksheet Functions | |||
Using sumproduct to count number by date | Excel Worksheet Functions | |||
SUMPRODUCT + DATE = 0 | Excel Worksheet Functions | |||
SUMPRODUCT + DATE = 0 | Excel Worksheet Functions | |||
SUMPRODUCT with date range question | Excel Discussion (Misc queries) |