Formula to Calculate items expiring in the next 10 days which are not closed yet

I am working on a formula on incident reporting to calculate items expiring in the next 10 days, where the status is not closed yet.

Can you advise if the following formula is correct?

=COUNTIFS({Expiry Date}, <=TODAY(10), {Status}, NOT(@cell = "Closed"))

I look at my sheet and there are only 2 items which are not closed and expiring in the next 10 days, but the calculation is showing 3. (1 item is expiring in next 10 days but already closed).

Would appreciate your feedback on this. Thanks.


  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    Do you have any rows where the date is blank and the status is not "Closed"? Blank date cells are considered as less than today and blank text cells are not "Closed".

  • Vivien Chong
    Vivien Chong ✭✭✭✭✭✭

    @Paul Newcome thanks for your quick response.

    With reference to the following, as of today (9 July), it should be 3 items expired and not closed.

    For items expiring in the next 10 days and not closed, it should be 0 now.

    But the results I got is: (I am using a metric sheet to reference to the above sheet)

    The formula I used for Expired without Closing: =COUNTIFS({Expiry Date}, <TODAY(), {Status}, NOT(@cell = "Closed"))

    The formula I used for Expiring in 10 days: =COUNTIFS({Expiry Date}, <=TODAY(10), {Status}, NOT(@cell = "Closed"))

    Do you have any idea if I have missed out on something?

    Appreciate your input.

    Thanks and have a blessed day!

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    Try this one for expiring in 10 days...

    =COUNTIFS({Expiry Date}, AND(@cell >= TODAY(), @cell <= TODAY(10)), {Status}, NOT(@cell = "Closed"))

  • Vivien Chong
    Vivien Chong ✭✭✭✭✭✭

    @Paul Newcome I think it works. I'll put in a few more dates to test the formula.

    So, when I use the formula with just {Expiry Date}, <=TODAY(10), does it mean that it captures all dates before Today + 10? Trying understand these formula better. :D

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    That is correct. It will pull in everything that is also in the past. To avoid this, we enter the opposite side of the date range which in this case is TODAY().

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!