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

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
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
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
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
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,215,029
Messages
6,122,757
Members
449,094
Latest member
dsharae57

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
Back
Top