convert number to month and year in formula

S

Soth

Hi

How do I wright a formula by converting number 1 to January 2006, Number 2
to February 2006 and soforth?

Thanks
Soth
 
D

David Billigmeier

=DATE(2006,your_number,1)

So,
DATE(2006,1,1) will output January 2006
DATE(2006,2,1) will output February 2006.

If you have a list of cells with 1,2,3, etc, say A1:A100, you can put the
formula =DATE(2006,A1,1) in cell B1 and drag down.

Does that help?
 
R

Ron Coderre

Depending on what kind of value you want:

For a number between 1 and 12, inclusive, in A1

Date value:
B1: =DATE(YEAR(TODAY()),A1,1)
Format B1 as a date: mmmm yyyy

or for a text value:
B1: =TEXT(A1&"/1/"&YEAR(TODAY()),"mmmm yyyy")

Does either of those help?
***********
Regards,
Ron

XL2002, WinXP
 
S

Soth

you guys are the best ! thanks.

Ron Coderre said:
Depending on what kind of value you want:

For a number between 1 and 12, inclusive, in A1

Date value:
B1: =DATE(YEAR(TODAY()),A1,1)
Format B1 as a date: mmmm yyyy

or for a text value:
B1: =TEXT(A1&"/1/"&YEAR(TODAY()),"mmmm yyyy")

Does either of those help?
***********
Regards,
Ron

XL2002, WinXP
 
Top