How to Add Text to a Formula in Excel
How to Add Text to a Formula in Excel: To add text to the beginning or end of your existing text in a cell, you can use the “&” operator or the CONCATENATE function. These functions allow you to concatenate text at specific character positions or before/after specific characters.
Do you want to add text to the beginning, middle, or end of your existing text in cells? Microsoft Excel has got you covered. You can use a formula or function to concatenate text into your cells, including finding a specific character and adding your text before or after that character. Here’s how.
Adding Text to the Beginning of a Cell
To add text before your existing text in a cell, you can use the “&” operator or the CONCATENATE function. Both methods work in a similar way.
To use the “&” operator, follow these steps:
Select the cell where you want to display the combined text.
In the selected cell, enter the following formula and press Enter. Replace “Mr. ” (including the space after the text) with the text you want to add, and replace B2 with the reference to the cell you want to append your text to.
="Mr. "&B2
Note that the added text is enclosed within double quotation marks. You can add any text, spaces, numbers, or symbols within the quotation marks, and Excel will concatenate them with the content of your current cell.
Adding Text before Text using the “&” operator.
If you prefer to use the CONCATENATE function, follow these steps:
Select the cell where you want to display the result.
In the selected cell, enter the following formula and press Enter. Replace “Mr. ” with the text you want to add, and replace B2 with the reference to the cell containing your current text.
=CONCAT("Mr. ",C2)
The result will be similar to the previous method.
Adding Text to the End of a Cell
To append custom text to the end of your existing text, you can also use the “&” operator or the CONCATENATE function.
If you prefer to use the “&” operator, follow these steps:
Click on the cell where you want to display the result.
In the selected cell, enter the following formula and press Enter. Replace B2 with the cell containing your current text, and replace “(Journalist)” with the text you want to append.
=B2&" (Journalist)"
There is a space before “(Journalist)” to add a space immediately after your existing text.
Adding Text after Text using the “&” operator.
If you want to use the CONCATENATE function, follow these steps:
Select the cell where you want to display the result.
In the selected cell, enter the following formula and press Enter. Again, replace B2 with the cell containing your current text, and replace “(Journalist)” with the text you want to add.
=CONCAT(B2," (Journalist)")
The result will be the same as using the “&” operator.
Adding Text after Specific Characters
Excel allows you to add custom text after a specified number of characters in your existing cell text or after a specific character.
To add your text after a specific number of characters, you can use the LEFT, RIGHT, and LEN functions combined with the “&” operator.
For example, to add a dash “-” after the second character in the content of cell C2, follow these steps:
Select the cell where you want to display the result.
In the selected cell, type the following formula and press Enter. Here, replace all instances of C2 with your cell reference, – (hyphen) with the text you want to add, and 2 with the number of characters after which you want your custom text to appear.
=LEFT(C2,2)&"-"&RIGHT(C2,LEN(C2)-2)
Soon as you press Enter, Excel will add the specified text and display the result.
Insert text after specific characters.
Add Text After a Specific Character
In case you want to add text after or before a specific character in a cell’s text content, then use Excel’s LEFT , SEARCH , RIGHT , and LEN functions.
For instance, to add 212 (NYC’s area code) after the # (hash) symbol, you’ll use the following formula. Here, you’ll replace C2 with the cell where your existing text is, # with the character after which you want to append your text, and 212 with the text to add.
=LEFT(C2,SEARCH("#",C2))&"212"&RIGHT(C2,LEN(C2)-SEARCH("#",C2))
You’ll see the result in your selected cell.
Once you’ve used a formula or function from the above sections, you can automatically copy it for all your records in the sheet. To do that, from the bottom-right corner of the cell where you’ve entered your function or formula, drag downwards until all your records are covered. And that’s all.