Calculate a value in Excel that combines text and numbers
If you want to combine text with the results of a formula in a cell, you can use concatenation.
For example, suppose you have calculated the total of a range of cells using a formula in cell D2. Now, you want to have cell A2 display the text "Today's sales are $12,000", where $12,000 is the value calculated in D2. As the value in D2 changes, you want the value in A2 to update automatically.
To do this, type the following formula into A2:
="Today's sales are $"&D2
The secret here is to use the ampersand, &, to concatenate (or join) text and numbers together. The & symbol acts like a +, or plus sign, to join text strings together into one. A slightly more advanced version of the formula above might look like the following:
="You owe $"&D2&", which is due in 7 days"
You can also use the CONCATENATE() function to join multiple text strings together. The syntax of this function is as follows:
=CONCATENATE(text1,text2,...)
In this function, you can join up to 30 text strings together. To achieve the same result as the first example above, you could enter the following formula:
=CONCATENATE("Today's sales are $",d2)
- Level of difficulty:
About Us
Fiveminutelessons.com is a website dedicated to providing free training on a range of subjects. including Google Analytics, Microsoft Word and Microsoft Excel.
Everything here is free for you to use while on the site. If you like something, why not link to it or support our sponsors. You can even become a sponsor.
Commercial Services
As well as the free training you get at www.fiveminutelessons.com, we also offer a range of commercial services to help you with your training and online learning requirements including:
- Private labelling
- Courseware development
- e-learning development
- Corporate subscriptions
- Learning consultancy services
- Documentation and user guide development
- Development of innovative corporate learning environments
Contact us now to find out more about our learning consultancy and courseware development services
