Tricky Tricks ›› Software Tricks ›› Excel Tricks ›› Concatenating Text With Dates

Concatenating Text With Dates

Tips And Tricks For Microsoft Excel

Concatenating Text With Dates:

By Default, when you concatenate text with a date in Excel, the date shows up as a serial number. Most of the time this is not very useful:


 Cell A1: Today
 
 Cell B1: 1/01/04
 
 Cell C1: =A1&" "&B1
 

This gives you the value in Cell C1: "Today 37987" - Including a space in between (37987 is the serial date for 1/01/04)

In order to show the actual formatted date instead of the serial date, use the following:


 Cell A1: Today
 
 Cell B1: 1/01/04
 
 Cell C1: =A1&" "&Text(B1,"d/mm/yy")
 
This gives you the value in Cell C1: "Today 1/01/04"

Basically, by including the "Text" function in the calculation, you are able to specify the formatting of a date or a number.

Partners