Convert Date to Text

mpeters

New Member
Joined
Mar 1, 2006
Messages
20
I have entered the first column to be automatic days of the year 1-Jan to 31-Dec automatically so when referencing them it turns to the number code, e.g. 39448 for Jan 1, 2008. Since I want to use the cancantnate function just on the text '1-Jan' this isn't working. Any ideas to fix this?
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Gerald Higgins

Well-known Member
Joined
Mar 26, 2007
Messages
9,258
Something like
Code:
=left(text(a1,"dd-mmm-yyyy"),6)
to return 01-Jan when a1 contains the date for 1st Jan 2008.

The result of this formula can be used in a concatenation formula.
 
Upvote 0

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
When concatenating try using the TEXT function, e.g. if A1 contains a date and B1 some text

=B1&TEXT(A1,"d-mmm")
 
Upvote 0

Mike Blackman

Well-known Member
Joined
Jun 8, 2007
Messages
2,494
Hi Gerald,

Could you not avoid the left function and format the cell like this?

=TEXT(A1,"dd-mmm")

EDIT. Used wrong format, should be "d-mmm" like Barry's
 
Last edited:
Upvote 0

Gerald Higgins

Well-known Member
Joined
Mar 26, 2007
Messages
9,258
Yes Mikey, indeed you could. I deliberately posted a fuller version of the TEXT formula to show what can be done with it, in case the OP was not familiar with it.
 
Upvote 0

Forum statistics

Threads
1,191,701
Messages
5,988,176
Members
440,135
Latest member
DCDavid

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