Please Note: This article is written for users of the following Microsoft Excel versions: 2007 and 2010. 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 October 12, 2016)

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 and 2010. 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

Including Section Numbers in an Index

When you use Word to create your index, you'll normally only include a page number in the index. If you want to create an ...

Discover More

Making Short Work of Menu Names

If your menu bar has become cluttered due to different add-ins you've added, you can free up space by shortening the menu ...

Discover More

Cross-referencing to an Automatic Number

Word allows you to add automatic numbering to different elements of your document, such as to headings. If you want to create ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (ribbon)

Counting Cells Containing a Formula

Cells in a worksheet can contain different types of information, such as numbers, text, and formulas. If you want to ...

Discover More

Indirectly Referencing a Cell on a Different Worksheet

Excel includes the powerful INDIRECT function which can be used to assemble references to other cells in your workbook. ...

Discover More

Compiling a List of Students in a Course

Need to pull just a limited amount of information from a large list? Here are a few approaches you might be able to use with ...

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 7 - 0?

2016-10-12 08:23:41

PhilW

JD, if you want your formula result to be treated as a numeric value, you can format the cell containing the formula with a custom number format. In your example, you could remove the TEXT function and the &" LITERS" from your formula and apply a custom format to the cell. Something like: 0.00 " LITERS" in the Custom Type field under Format Cells/Number tab.
This will still display with the LITERS label, but the cell value will be numeric instead of text, which is useful if you want to perform any calculations on the cell.


2016-10-12 08:14:18

Barry

These techniques whilst are of merit have one important side effect which is the result cannot be used in further calculations should the need arise (or not without a lot of difficulty).

Another way of achieving the same result is to use Custom Formatting of cells so the equivalent formatting for the above examples would be:

1. "3.27 miles." would be formatted as 0.00" miles" cell would be =3.27
2. ="1 + 1 is " & 1+1 would be formatted as "1 + 1 is " 0; cell would be =1+1
3. ="1 + 1 is " & TEXT(1+1, "0.00") would become the format "1 + 1 is " 0.00 ; cell is =1+1
4. ="Today is " & TEXT(NOW(),"dddd, mmm dd, yyyy") would be formatted as "Today is " dddd, mmm dd, yyyy and the cell having the formula =NOW()


2016-06-20 05:41:01

T. van der Kooi

Helpful tip!


2015-09-10 08:15:44

JD

Very helpful!!
I was trying to figure out how to remove additional decimal places in value derived from lookup table and used with additional text...
=TEXT(LOOKUP(H16,'Drop Down and Lookup'!U4:U43,'Drop Down and Lookup'!U5:U43),0)&" LITERS"


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.