Explanation

In this example, the goal is to join a text string to a formatted date.

The challenge is that numbers lose their formatting in Excel when they are concatenated in a formula.

When date formatting is applied to a cell on the worksheet, the number is displayed as a date.

Formatting the same date with different date format codes

Since the TEXT function always returns text, it works perfectly for concatenating formatted numbers to text strings.

Excel’s date formatting codes are flexible so you might format the same date in many different ways.

As the formula is copied down, the reference to B5 changes while the reference to D2 does not.

Formatting the same date with different date format codes

The final result is the same date displayed in eleven different ways.

Change the date in D2 to another month to see different results.

in a text string with the number format of your choice.

Formatting the same date with different date format codes

Formatting the same date with different date format codes

Formatting the same date with different date format codes

Excel formula: Extract date from text string

Excel formula: Get day name from date

Excel formula: Get month name from date

Excel formula: Convert date to text

Excel formula: Join cells with comma

Excel TEXT function

Article image

Article image

Article image

Formatting the same date with different date format codes