# Formula help for previous month

Options
✭✭✭✭
edited 12/09/19

I have a helper column for a report that I want to check the box if the DATE cell is in the previous month.   Any help is appreciated!!

Tags:

• ✭✭✭✭✭✭
Options

Try something like this...

=IF(MONTH([Date Column]@row) = MONTH(TODAY()) - 1, 1)

• ✭✭
Options

@Paul Newcome Thanks for the tip. It worked, however, now after the year change it doesn't work for December when we're in January. Any idea how I can fix this?

• ✭✭✭✭✭✭
Options

=IF(MONTH([Date Column]@row) = IF(MONTH(TODAY()) = 1, 12, MONTH(TODAY()) - 1), 1)

• ✭✭
Options

@Paul Newcome Awesome! Thank you so much.

• ✭✭✭✭✭✭
Options

• ✭✭✭✭✭✭
Options

@Paul Newcome You're the best!

• ✭✭✭✭
Options

Hi @Paul Newcome, would you mind explaining how this formula works?

Thank you,

• ✭✭✭✭✭✭
Options

If the MONTH of the date in [Date Column]@row is equal to 12 or the Month of TODAY minus 1 depending on the MONTH of TODAY, then output 1.

• ✭✭✭✭
Options

Thank you @Paul Newcome

• ✭✭✭✭✭✭
edited 01/05/24
Options

To take into account the year, see this thread: https://community.smartsheet.com/discussion/comment/412060#Comment_412060

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!