# Previous Month formula

✭✭✭✭✭

Hi

I'm in the process of creating MTD and Previous MTD helper columns. If the Create Date is current month, I want to check a box. I have this formula working perfectly. What I'm struggling with is previous MTD. If the Create Date is the previous month, then check a box. If the Create Date is older than previous month, don't check the box or uncheck the box if it was already check. Below is my formula for the MTD

=IF(AND(YEAR(Created@row) = YEAR(TODAY()), MONTH(Created@row) = MONTH(TODAY())), 1)

I'm sure it is an easy formula but I can't figure it out.

Tags:

• ✭✭✭✭✭✭

If you're just wanting the month to compare to last (e.g. July today vs. June last), then this will do what you're after:

=IF(AND(YEAR(Created@row) = YEAR(TODAY()), MONTH(Created@row) = (MONTH(TODAY())) - 1), 1)

Hope this helps! 😊

• ✭✭✭✭✭✭

If you're just wanting the month to compare to last (e.g. July today vs. June last), then this will do what you're after:

=IF(AND(YEAR(Created@row) = YEAR(TODAY()), MONTH(Created@row) = (MONTH(TODAY())) - 1), 1)

Hope this helps! 😊

• ✭✭✭✭✭

@Nick Korna - that did it. I have the 1 in the wrong place. I had it in the TODAY(-1). Thank you for your help and I hope you have a great day!

• ✭✭✭✭✭✭

You're more than welcome; happy to have helped!

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!