Formula

Lambada

Board Regular
Joined
May 10, 2002
Messages
62
How do I convert a number into year? I have on A2 a number "2", I want cell B5 to copy that value as February and on B6 as February 1, XXXX. I already try cell format, but I only get January regardless of the number I use.

Thank you.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Albert 1

Active Member
Joined
Feb 22, 2002
Messages
395
B5:
=CHOOSE(A2,"January","February","March","April","May","June","July","August","September","October","November","December")

B6:
=CHOOSE(A2,"January","February","March","April","May","June","July","August","September","October","November","December")&" 1, 2002"
 
Upvote 0

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
On 2002-08-26 06:01, Albert 1 wrote:
B5:
=CHOOSE(A2,"January","February","March","April","May","June","July","August","September","October","November","December")

B6:
=CHOOSE(A2,"January","February","March","April","May","June","July","August","September","October","November","December")&" 1, 2002"

Or, in B6 simply...

=DATE(YEAR(TODAY()),A2,1)

which is a true date.

You can use just a hardcoded number or a cell housing a year, say, 2002, instead of the YEAR(TODAY()) bit.
 
Upvote 0

Lambada

Board Regular
Joined
May 10, 2002
Messages
62
Thank you! How can I get this one to pick the year from cell AF1

B6:
=CHOOSE(A2,"January","February","March","April","May","June","July","August","September","October","November","December")&" 1, 2002"

Thank you.
 
Upvote 0

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
On 2002-08-29 17:25, Lambada wrote:
Thank you! How can I get this one to pick the year from cell AF1

B6:
=CHOOSE(A2,"January","February","March","April","May","June","July","August","September","October","November","December")&" 1, 2002"

Thank you.

=CHOOSE(A2,"January","February","March","April","May","June","July","August","September","October","November","December")&" 1, "&AF1

But, why don't you want to use the shorter formula and custom format the formula cell to your heart's desire?
 
Upvote 0

Forum statistics

Threads
1,191,031
Messages
5,984,235
Members
439,879
Latest member
KingGoulash

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top