Technology

#How to Add Text to a Cell With a Formula in Excel

“How to Add Text to a Cell With a Formula in Excel”

Microsoft Excel logo.

To add text to the beginning or the end of your existing text, use the “&” operator or the CONCAT function. Using other functions, you can add text at the nth character or before or after a specific character.

Do you want to add some text to the beginning, middle, or end of the existing text in your cells? Microsoft Excel has you covered. You can use a formula or function to append text to your cells, including finding a specific character and adding your text before or after it. Here’s how.

Add Text to the Beginning of a Cell

To add some text before your existing text in a cell, simply use the & (ampersand) operator or the CONCAT function. Both work the same way.

To use them, first, open your Excel spreadsheet and select the cell where you want to display your merged text.

Select a cell.

In the chosen cell, type the following formula and press Enter. In this formula, replace Mr.  (note the space after the text) with the text you want to add and B2 with the reference of the cell where you want to append your text.

="Mr. "&B2

Note that we’ve enclosed the text to add in double-quotes. You can add any text, spaces, numbers, or symbols within these quotes, and Excel will append them to your existing cell content.

Add text before text using the & operator.

If you’d like to use the CONCAT function, then in the cell where you want to display the result, enter the following function and press Enter. Here, replace Mr.  with the text to add and B2 with the cell reference where your existing text is.

=CONCAT("Mr. ",C2)

Your result will look like the following:

Add text before text using CONCAT.

RELATED: How to Add Space Between Text and Cell Borders in Excel

Add Text to the End of a Cell

To append your custom text at the end of your existing text, use the same & (ampersand) operator or the CONCAT function.

If you’d like to use the & operator, then in your Excel spreadsheet, click the cell where you want to display the result.

Choose a cell.

In the selected cell, type the following formula and press Enter. Here, replace B2 with the cell where your existing text is and (Journalist)with the text you want to append.

=B2&" (Journalist)"

There’s a space before (Journalist) so that this custom text adds a space right after your existing text ends.

Add text after text using the & operator.

If you’d like to use the CONCAT function, then in your chosen cell, enter the following and press the Enter key. Once again, replace B2 with the cell containing your existing text and (Journalist) with the text you want to add.

=CONCAT(B2," (Journalist)")

And here’s what the result will look like:

Add text after text using CONCAT.

RELATED: How to Add Alternative Text to an Object in Microsoft Excel

Add Text After a Specific Number of Characters

Excel allows you to add custom text after the specified number of characters in your existing text or after a specific character.

To add your text after a specific number of characters, use the LEFT , RIGHT , and LEN functions in combination with the & operator.

For example, to add a - (hyphen) after the second character in the C2 cell’s content, 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.

Append text after a specific character.

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.

Is your concatenated text not fitting Excel’s default cell size? There’s a way to shrink or expand your cells.

If you liked the article, do not forget to share it with your friends. Follow us on Google News too, click on the star and choose us from your favorites.

For forums sites go to Forum.BuradaBiliyorum.Com

If you want to read more like this article, you can visit our Technology category.

Source

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button
Close

Please allow ads on our site

Please consider supporting us by disabling your ad blocker!