Multiple IFs but the syntax is off!
Good morning! I think my syntax is off but I'm not seeing where...and could use another pair of eyes, please! The Month column is =MONTH(Date@row) which works fine. I've added the helper column for months 0 through 9 with no leading zero so that when sorting on pivots, it will be in order (01...09, 10, etc.).
Formula:
=IFERROR(IF(Month@row = 1, "01", IF(Month@row = 2, "02", IF(Month@row = 3, "03", IF(Month@row = 4, "04", IF(Month@row = 5, "05", IF(Month@row = 6, "06", IF(Month@row = 7, "07", IF(Month@row = 8, "08", IF(Month@row = 9, "09")""))))))))))
Best Answer
-
Thank you, @Toufong Vang - that works too!
Answers
-
Hi, @chrishallo_Charter,
To get a 2-character month, prepend a "0" to the result of MONTH(), then take the first 2 characters from the right, RIGHT(__, 2).
=RIGHT(
"0" +
MONTH([myDate]@row
),2
) -
Thank you, @Toufong Vang - that works too!
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!