Current Month and Previous Month
Hello!
Looking for some quick help with a couple of formulas.
I currently have monthly columns (Jan - Dec) that are updated with data every month. I'm looking to make a [Current Month] column and a [Previous Month] column to display the data respectively. These will be used for charts on reporting dashboards.
Any help would be greatly appreciated.
Thanks,
Luke
Best Answer
-
Hi Luke,
You can use the MONTH function. Here's how the formula may look for you:
For current:
=IF(MONTH(TODAY()) = 1, Jan@row, IF(MONTH(TODAY()) = 2, Feb@row, IF(MONTH(TODAY()) = 3, Mar@row, IF(MONTH(TODAY()) = 4, Apr@row, IF(MONTH(TODAY()) = 5, May@row, IF(MONTH(TODAY()) = 6, Jun@row, IF(MONTH(TODAY()) = 7, Jul@row, IF(MONTH(TODAY()) = 8, Aug@row, IF(MONTH(TODAY()) = 9, Sep@row, IF(MONTH(TODAY()) = 10, Oct@row, IF(MONTH(TODAY()) = 11, Nov@row, IF(MONTH(TODAY()) = 12, Dec@row, ""))))))))))))
For previous:
=IF(MONTH(TODAY()) - 1 = 1, Jan@row, IF(MONTH(TODAY()) - 1 = 2, Feb@row, IF(MONTH(TODAY()) - 1 = 3, Mar@row, IF(MONTH(TODAY()) - 1 = 4, Apr@row, IF(MONTH(TODAY()) - 1 = 5, May@row, IF(MONTH(TODAY()) - 1 = 6, Jun@row, IF(MONTH(TODAY()) - 1 = 7, Jul@row, IF(MONTH(TODAY()) - 1 = 8, Aug@row, IF(MONTH(TODAY()) - 1 = 9, Sep@row, IF(MONTH(TODAY()) - 1 = 10, Oct@row, IF(MONTH(TODAY()) - 1 = 11, Nov@row, IF(MONTH(TODAY()) - 1 = 12, Dec@row, ""))))))))))))
Hope this helps!
Best,
Heather
Answers
-
Hi Luke,
You can use the MONTH function. Here's how the formula may look for you:
For current:
=IF(MONTH(TODAY()) = 1, Jan@row, IF(MONTH(TODAY()) = 2, Feb@row, IF(MONTH(TODAY()) = 3, Mar@row, IF(MONTH(TODAY()) = 4, Apr@row, IF(MONTH(TODAY()) = 5, May@row, IF(MONTH(TODAY()) = 6, Jun@row, IF(MONTH(TODAY()) = 7, Jul@row, IF(MONTH(TODAY()) = 8, Aug@row, IF(MONTH(TODAY()) = 9, Sep@row, IF(MONTH(TODAY()) = 10, Oct@row, IF(MONTH(TODAY()) = 11, Nov@row, IF(MONTH(TODAY()) = 12, Dec@row, ""))))))))))))
For previous:
=IF(MONTH(TODAY()) - 1 = 1, Jan@row, IF(MONTH(TODAY()) - 1 = 2, Feb@row, IF(MONTH(TODAY()) - 1 = 3, Mar@row, IF(MONTH(TODAY()) - 1 = 4, Apr@row, IF(MONTH(TODAY()) - 1 = 5, May@row, IF(MONTH(TODAY()) - 1 = 6, Jun@row, IF(MONTH(TODAY()) - 1 = 7, Jul@row, IF(MONTH(TODAY()) - 1 = 8, Aug@row, IF(MONTH(TODAY()) - 1 = 9, Sep@row, IF(MONTH(TODAY()) - 1 = 10, Oct@row, IF(MONTH(TODAY()) - 1 = 11, Nov@row, IF(MONTH(TODAY()) - 1 = 12, Dec@row, ""))))))))))))
Hope this helps!
Best,
Heather
-
Thank you so much Heather! That worked perfectly!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.3K Get Help
- 364 Global Discussions
- 199 Industry Talk
- 428 Announcements
- 4.4K Ideas & Feature Requests
- 136 Brandfolder
- 127 Just for fun
- 128 Community Job Board
- 445 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 283 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!