Applies ToExcel for Microsoft 365 Excel for Microsoft 365 for Mac Excel 2024 Excel 2024 for Mac Excel 2021 Excel 2021 for Mac Excel 2019 Excel 2016

Suppose you want to create a grammatically correct sentence from several columns of data for a mass mailing or format dates with text without affecting formulas that use those dates. To combine text with a date or time, use the TEXT function and the & (ampersand) operator.

Example

Examples to show how formulas can combine text with date and time values

The TEXT function requires two arguments (that is, items between its parentheses). The first argument is a value, such as a date or a number. This value is converted to a text value. The second argument, format_text, is a special string that Excel recognizes and uses to display the converted text value in a format that you specify. In the second and third examples, the dates in B3 and B4 are converted to text and then is displayed in two different formats: “d-mmm-yyyy” (resulting in June 4, 2010) and “mmmm d, yyyy.” (resulting in Jun-07- 2010).

TEXT function

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.