Combining Numbers and Text in a Cell
Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Combining Numbers and Text in a Cell.
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 (2582) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Combining Numbers and Text in a Cell.
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!
Leave your own comment:
Comments for this tip:
Arun 31 Dec 2016, 02:38
My question is how to add on excel H8+S8+8+s4+h5
All these are in same row.
I want to use all these letters and numbers for calculating the wages.
Arun 31 Dec 2016, 02:31
HOW TO ADD on excel H8+S8+8+s4+h5
Willy Vanhaelen 08 Oct 2016, 05:44
This formula will work: =(A1/0.159)& "bbl"
It looks the same but it isn't. You used 2 times 2 apostrophes (') instead 2 quotes (").
Paul Onomuakpose 07 Oct 2016, 07:05
I want to combine this formula on a cell but its not working;
the result will be 43bbl on a cell
How can I go about it
Bill 26 Aug 2016, 11:18
I want to enter a time with AM or PM and have it displayed with the colon. i.e. 530PM and have it display 5:30 PM.
I have used ##:##;;;@ but it excel assumes it is text if I add pm or am.Ir I use h:mm AM/PM and enter 530 it assumes hours and doesn't add the colon.
I want the user to input AM or PM but not have to enter the colon.
nagarjuna 10 Aug 2016, 09:36
Hai sir,This is possible in excel F33 = 101063 F34 = 30319 =((F33-F34),"Cubicmeter")
Barry 06 Mar 2016, 06:35
Use the formula: =ROUNDUP((D8+H12+H17),0) & " MONTHS"
Harold 05 Mar 2016, 15:05
=(D8+H12+H17)& " months"
And the result is 27.891424567 Month
The referenced cells are (d8,h12,h17)are sum formulas as well and are formatted as numbers with no decimals.
My questions is how can I get the result of my text formula to round up to a simple result of 28 Months
Thank you Harold
Chris 04 Jan 2016, 14:43
Ahh never mind I have the solution:
=TEXT(J3, "0.000")&" ± "&TEXT(O3, "0.0000")
Chris 04 Jan 2016, 14:04
Here's a good one. I want to take a calculated value from a cell then put a symbol "±" then bring in a calculated value from a different cell. I got it to work once however the decimal places are way to high and formatting cell to number did not fix it.
Here is my cell now:
=(J3)&" ± "&(O3)
Angel 11 Dec 2015, 16:00
If you are trying to present the min and max range in a single cell then do the following.
Have a cell for the min and have a cell for the max (can use the min and max functions for this). Then have a cell set a side for the range.
Data 1 34
Data 2 2
Data 3 11
Range =B4 &- B5
The Range would then look like 2-34
Willy Vanhaelen 07 Oct 2015, 12:04
Create a custom number format and enter
in the type box
Naga Mallikarjun 06 Oct 2015, 15:10
I am trying to keep date format and would like add text with out using formula
current cell have 07/04/2012 13:52:09
i would like to add '07/04/2012 13:52:09
but when i add ' it is converting to another format like general
how can we maintain the date format and add this ' for all the cells in one go
Anil 04 Jul 2015, 09:02
Am trying to use different numbers like this (132.08-130.01=2.07
etc...) and with same comments like(132.08-130.01=2.07 Gas usage charges for June-15.
178.556-172.321=6.235 Gas usage charges for June-15).
<<<<<Please help me anyone>>>>>>
MS Karbagam 24 Jun 2015, 21:29
I'm using Microsoft Excel 97-2003 Worksheet.xls.
When I want to sum text(currency) with numbers, it does not function. How can i do it.
nhb 23 Mar 2015, 14:41
I am trying to write a schedule with w hole numbers(got that part) but also in the cell I would like to put "RDO" for requested day off and at the end of the week I would like it to show the total hours I scheduled divided by 100 in help would be great.
Monday 0800 1200 400/100 4 hrs
total hours 4
Madi 11 Mar 2015, 01:29
Use the round function and number of decimals and then "&". E.G to get age of the people from a table all you need is a dob. so here is the formula that i used =ROUND(($E$1-C5)/365,2) & " Years"
where E1 contains Current date as NOW() and c5 is the date of birth. if you subtract 2 dates it will give you number of days by default so divide that by 365 you get nuimber of days with plenty of decimal places with round you can control the number of decimal places and i have used 2 .Answer will be like 45.8 Years
Ramiz 19 Feb 2015, 02:06
I want to combine Sum of amount and a text in one cell
For Example The result should be :
"Chq No. 1251 -35000.00"
I can combine number and text but the decimal is missing
hasan 06 Feb 2015, 02:14
You can use Custom Formatting to achieve that. Select your cells > Right click> Format Cells> Number> Custom. Now in the Type field write (#,##) after pressing the enter button you'll notice that your value will look like 5,166,451,235. Now go to Type field again write (,) this will shed last three numbers and your number will look like this 5,166,451. Adding another (,,) will shed 6 numbers and so on. For the decimal places just write (0) in the Type field and then change it to (0.0) try adding more zeros after the decimal and you'll notice that it controls the number of decimal places you want to have. For adding colors try writing ([Red]) in the Type field. You can have more fun by using ([Green];[Red];[Black]) what this will do is all the positive numbers will be displayed in green, all the negative numbers will be displayed in red and if there's a 0 it'll be displayed in black. You can always play with the colors. Finally, here's the final thing try putting this in the Type box ([Red]#,##0,,;[Green]-#,##0,,;[Black]) I hope this answers your query. If there's anything you want to know feel free to post I'm not an excel guru but I'll sure try to help you out!
ps ignore the brackets!
Nikos 16 Jan 2014, 15:25
How can i change the color , formating or
number of decemicals in a combination
Imagine that a cell involved in the combination is a number result from a formula i.e 5,166451235
and i want this to appear red and 5,17
Thancs in advance