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
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!