SUMIF formula for adding up in a date range

bobdab
bobdab
edited 12/09/19 in Smartsheet Basics

I have a sheet that I am using to collect a list of items weights and have multiple per day. i want to capture all the weights that are today and for the next 5 days and sum them up if possible.

 

Currently i have tried this formula

=SUMIF(Date:Date, <=TODAY(), [Qty (ton)]:[Qty (ton)])

but this includes all the past dates, is there a way to only show the sum of the dates from today onwards?

i also want to count each of the lines to i know how many lines are recorded against a certain date if possible.

any assistance you could offer would be greatly appreciated!

 

Tags:

Comments

  • Hello,

    If you're trying to capture dates today and after, I think you'll need to flip the "<=" to ">=".  That will get dates that are greater than or equal to today.  If you only want to capture a certain number of days from today, you can place that number in the parentheses immediately after today.  

    There's also a Countif function that you can use to count the rows.  =COUNTIF(Date:Date, >=TODAY())

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    To count/sum BETWEEN specific dates, you can include both sets of criteria for the range within an AND statement.

     

    =SUMIF(Date:Date, AND(@cell >=TODAY(), @cell <= TODAY(5)), [Qty (ton)]:[Qty (ton)])

    .

    The same can be used for the count:

     

    =COUNTIF(Date:Date, AND(@cell >=TODAY(), @cell <= TODAY(5)))