Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Combining Numbers and Text in a Cell.

Combining Numbers and Text in a Cell

by Allen Wyatt
(last updated March 30, 2019)

4

Many times, I want a description for my data. One approach is to put the description—a simple text string—near the cell containing the data that needs describing. For instance, a numeric value could go in cell B3, and the unit description in cell C3, which read together may be something like "3.27 miles."

Another approach is to put the description text and the numeric value together. Creating text strings easily accomplishes this feat. Here's a very simple example that displays "1 + 1 is 2."

="1 + 1 is " & 1+1

The quotation marks are important. By making the text string part of a formula, you can combine the description and the value within one cell.

The disadvantage of this approach is formatting the value takes more effort; since the result is a text string, numeric cell formatting does not apply. For example, consider the above formula and the need to display two decimal places. One might naturally display the Format Cell dialog box and then choose a Number format that has two decimal places, but the results would not change. (Remember, the result of the formula is text, not a number.)

To affect the value formatting, use the TEXT function. To force the above results to display the value to two decimal places, use the following formula.

="1 + 1 is " & TEXT(1+1, "0.00")

The different formats you can use with the TEXT function have been covered in other issues of ExcelTips, and you can also find more info in Excel's Help system. Here's an example that displays "Today is " along with today's date. Enter the following formula in some cell:

="Today is " & TEXT(NOW(),"dddd, mmm dd, yyyy")

Again, the quotation marks are important, as you are constructing a text string.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9306) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. You can find a version of this tip for the older menu interface of Excel here: Combining Numbers and Text in a Cell.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Counting Consecutive Negative Numbers

If you have a range of values that can be either positive or negative, you might wonder how to determine the largest ...

Discover More

Changing Months in a Workbook

When you copy a worksheet and then need to make changes to information in that worksheet (such as changing month names), ...

Discover More

Specifying an Index Page-Range Separator

When generating an index, Word normally uses a dash to indicate page ranges. You can change the character used for these ...

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

More ExcelTips (ribbon)

Counting Precedents and Dependents

Do you need to know how many precedents or dependents there are on a worksheet? You could count them manually, or you ...

Discover More

Saving Common Formulas

Got some formulas you slaved over and want to use in lots of workbooks? This tip presents some helpful ideas on how you ...

Discover More

Deriving Monthly Median Values

When processing huge amounts of data, it can be a challenge to figure out how to derive the aggregate values you need. ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 5 + 7?

2019-07-04 02:59:29

SteveJez

Mohammed,
Add the 2 cells together, such as C2=A2+B2
then custom format the cell (Ctrl 1) Number - Custom & use

dd/mm/yyyy hh:mm:ss AM/PM as the format (see Figure 1 below)

HTH

Figure 1. Date Time Custom Format


2019-07-03 05:06:53

Mohammed Nufail

Hi. I have some data in excel. Date is in separate cell: Eg; (16/06/2019) . Time is in separate cell. Eg; (9:11:45 AM)
Need to combine together in to once cell. But when converted it comes with numbers only.

Can you please fix this


2019-03-30 16:59:37

Erik

In some cases, custom formatting might work better. For example, you can put "=NOW()" in a cell and it will remain a value. Then, highlight that cell, open the "Format Cells" window (ctrl-1 is one easy way), select the "Number" tab, and set the "Category:" to "Custom". Put this in the "Type:" box (including quotes):

"today is "dddd, mmm dd, yyyy

This method is works well for other instances, for example showing units. But is not ideal in cases where the text might frequently change, for example the 1+1 example.


2019-03-30 07:52:14

David R

To retain the cell as a numeric value and thence be able to affect the number of decimal places or use it as a number in a formula, etc, try custom formatting, ie "1+1=" # or some such. I use this a lot when I want to the number to be associated with a descriptive word like "Extra" or "Total = " or "Hold for tomorrow" or "George's share".


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.