Need a check mark for rows added last month

Options

I want a checkmark to appear when entries were created the previous month. i.e., all April entries would have a checkmark, and starting June 1, only May entries, and so on. I thought the following formula was a good place to begin, but apparently the -1 is only subtracting a day, not a month. =IF(MONTH([Entry Date]@row) = MONTH(TODAY(-1)), 1)

Please advise. Thank you!

Answers

  • Sameer Karkhanis
    Sameer Karkhanis ✭✭✭✭✭✭
    Options

    That won't work ;-) The function TODAY(-1) will give you yesterday's date, so it has to be MONTH(TODAY())-1for last month

    Try the below, (I have factored in the year too as considering only month will give you incorrect results when you have entries from past or next year)

    =IFERROR(IF(MONTH(TODAY()) <> 1, IF(AND( (MONTH(TODAY()) - MONTH([Entry Date]@row) = 1), (YEAR(TODAY()) = YEAR([Entry Date]@row)) ), 1, 0), IF(AND( (YEAR(TODAY()) - YEAR([Entry Date]@row) = 1), (MONTH([Entry Date]@row) = 12) ), 1, 0)), 0)

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!