for converting a number between 1 to 12 to the corresponding month

Copper Contributor

for eg, inorder to convert 2 to February or 9 to September, which function to be used?

7 Replies

Hello

 

There are many solutions. Perhaps the shortest would be:

 

=TEXT(DATE(,A1,1);"MMMM")

Detlef, even shorter will be =TEXT(A1*28,"mmmm")

Nice solution, Sergei. It also works with 29 and 30.

 

Yes, year 1900 was leap one. But that's only for Georgian calendar, perhaps your formula is more correct if use other calendars.

Thanks to all rushed for my help. As it requires multiple verification and printing appropriate month, I chose the following formula and working properly
=IF(G12=1,"Jan",IF(G12=2,"Feb",IF(G12=3,"Mar",...............))))))))))))

With this apprach you may use shorter equivalent =SWITCH(G12,1,"Jan",2,"Feb",..."Not Defined")

also a vlookup (or index match) to a table containing month number in one column and month name in another is a simple and flexible option and easier to write and debug han a long IF formula

 

 

Reghunadh Parameswarannair wrote:

Thanks to all rushed for my help. As it requires multiple verification and printing appropriate month, I chose the following formula and working properly
=IF(G12=1,"Jan",IF(G12=2,"Feb",IF(G12=3,"Mar",...............))))))))))))