To add text after an Excel formula, use the ampersand symbol (&) to concatenate (join) the formula result with a text string enclosed in double quotation marks. For example, =SUM(A1:A10) & " units" will calculate the total and display the word "units" immediately following the number.
This technique is essential for creating reports that are easy for others to read. Instead of having a separate column for labels (like "kg", "pcs", or "USD"), you can embed the label directly into the cell while maintaining the underlying mathematical value for further calculations in other cells.
What You'll Need
- Microsoft Excel (any version) or a compatible spreadsheet application like Google Sheets.
- A dataset with numerical values that require a label or suffix.
- Basic knowledge of where to enter formulas in the formula bar.
Step-by-Step
- Select the cell where you want the result to appear.
- Start with the equals sign: Type
=to tell Excel you are beginning a formula. - Enter your mathematical formula: Type the calculation you need. For example, if you are totaling a column, type
SUM(B2:B20). - Insert the ampersand: Immediately after the closing parenthesis of your formula, type the
&symbol. This symbol tells Excel to "glue" the result of the formula to whatever follows. - Add a space: To prevent the text from touching the number (e.g., "100units"), type a space inside the quotation marks.
- Enter the text in quotes: Type your desired text inside double quotation marks. For example,
" units". - Press Enter: Your final formula should look like this:
=SUM(B2:B20) & " units".
Advanced Method: Using the TEXT Function
If your formula results in a decimal or a date, the ampersand method often strips away the formatting (e.g., 10.50 becomes 10.5). To keep your formatting, use the TEXT function:
- Type
=TEXT(your_formula, "format_code") & " your text". - Example for currency:
=TEXT(SUM(B2:B20), "$#,##0.00") & " Total". - This ensures the number looks like money while still allowing you to add the word "Total" at the end.
Common Mistakes
- Forgetting the Quotation Marks: If you type
& unitsinstead of& " units", Excel will return a #NAME? error because it thinks "units" is a named range or a function. - Missing the Space: Forgetting to put a space inside the quotes (e.g.,
"units"instead of" units") results in the text being jammed against the number. - Incorrect Ampersand Placement: Placing the
&inside the parentheses of the formula will cause a syntax error. It must always be outside the function. - Trying to Sum "Text-Numbers": Once you add text to a formula using this method, Excel treats the cell as "Text" rather than a "Number." You cannot use a
SUMfunction on a range of cells that have been concatenated with text.
Tips
- Use Cell References for Text: Instead of typing the text in the formula, put the label in another cell (e.g., D1) and use
=SUM(B2:B20) & " " & D1. This allows you to change the label for the entire sheet in one place. - Custom Number Formatting: If you need to perform further math on these cells, do not use the ampersand method. Instead, right-click the cell > Format Cells > Number > Custom and type
0 " units". This displays the text but keeps the cell value as a pure number. - Line Breaks: You can add a line break before your text by using
CHAR(10). Example:=SUM(B2:B20) & CHAR(10) & "Total Amount". (Note: You must enable "Wrap Text" in the Home tab for this to work).
Troubleshooting
If your formula is not working as expected, try these steps in order:
- Check for #NAME? Error: This almost always means you forgot the double quotes around your text string. Ensure every piece of text is wrapped in
" ". - Check for #VALUE! Error: Ensure your formula part (the math) is actually working. Try running the formula without the
& " text"part to see if the math is the problem. - Check Formatting: If your number looks strange (e.g., 1234.56789 instead of 1,234.57), switch to the
TEXTfunction method described in the step-by-step section. - Verify the Ampersand: Make sure you are using the
&symbol (Shift + 7 on most keyboards) and not a similar-looking character.
Frequently Asked Questions
Can I add text before the formula instead of after?
Yes. Simply place the text and ampersand at the beginning: ="Total: " & SUM(A1:A10).
Will this change the value of the cell for other formulas?
Yes. When you use the ampersand to add text, Excel converts the result to a text string. Other formulas trying to calculate based on that cell will likely return an error or zero.
How do I add text after a date formula?
Use the TEXT function to preserve the date format: =TEXT(A1, "mm/dd/yyyy") & " - Due Date". Otherwise, Excel will display the date as a raw serial number.
Does this work in Google Sheets?
Yes, the ampersand (&) and TEXT function syntax are identical in Google Sheets and Microsoft Excel.
Can I join multiple pieces of text and formulas together?
Yes. You can chain as many ampersands as you need. Example: ="The total is " & SUM(A1:A10) & " for the month of " & B1.