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 2character 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
Check out the Formula Handbook template!