I am trying to sum a column of quantities over the last 30 days. Col A is a column of dates. Col B is the quantity of something for that date. The goal is to produce a sum of all quantities over only the last 30 days.

I've tried a number of variations on the cell formula in the subject line. The problem seems to be the test itself. Specifically, if I hardcode a date in number format, it works. But, when I introduce the TODAY() function, it breaks and always produces 0. I've tried "<TODAY()", referencing a cell that contains the current date returned by +TODAY(), an actual date entry, etc. The only thing that seems to work is to put in a 5 digit number representation of a date, or to reference a cell with a 5 digit number.

Why doesn't it work? Is this a bug?

Or, if I have it wrong, can someone please correct the condition for me, or tell me what I'm doing wrong????

thanks!

Here's essentially the spreadsheet:

[Table=]

This is cell A1 02/13/20 Today's date

TOTAL (30 d): 0 <<-- Formula in B2 is this: =+SUMIF(A4:A10 ;" >TODAY()-30" ; B4:B10 )

Date Quan Comment

01/15/20 1

01/15/20 1

01/26/20 1

01/30/20 1

02/13/20 2

[/Table]