How to add text to the beginning or end of all cells in Excel?

Sometimes you may need to add same specific text to the beginning or end of all cells in a selection. If you added the text to each cell manually one by one, it must be time-consuming. Are there easier ways? Yes, there are many easy tricks to add same text to the beginning or end of all cells in a selection.

Add specified text to the beginning / end of all cells with formulas

Add specified text to the beginning / end of all cells with VBA

Add specified text to the beginning / end of all ells with Kutools for Excel

Kutools for Excel: 120 Cool Tools and Advanced Features for Excel 2013, 2010 and 2007. Read more...
Office Tab: Enable Tabbed Editing and Browsing in Office, Just Like Chrome, Firefox, IE 8/9/10. Read more...
Classic Menu for Office: Bring Classic Menus and Toolbars of Office 2003/XP/2000 Back to Office 2007, 2010 and 2013. Read more...

Suppose you have a name roll as following screenshot shows, and the follow methods will guide you add specified text at the beginning and end of each cell in A1:C5.

doc-add-text-1


Hot
Amazing! Using Tabs in Excel like Firefox, Chrome, Internet Explore 10!

Learn more Free download

arrow blue right bubble Add specified text to the beginning / end of all cells with formulas

There are two formulas to add specified text to the beginning or end of all selected cells in Microsoft Excel.

Method 1: & formula

Enter the ="Class A: "&A1 in Cell E1, and copy this formula to other cells with dragging the bottom right corner of the Cell E1.

doc-add-text-2

Method 2: Concatenate formula

Enter the =Concatenate ("Class A: ", A1) in Cell E1, and copy this formula to other cells with with dragging the bottom right corner of the Cell E1.

doc-add-text-3

Notes

1. If you want to add specified text in each cell, just replace the Class A: with your text in both formulas.

2. The formulas of =A1 & "Class A: " and =Concatenate (A1, "Class A: ") will add Class A: at the end of Cell A1.

3. Both formulas will not modify the contents in selection directly.


arrow blue right bubble Add specified text to the beginning / end of all cells with VBA

If you want to add specified text in each cells of a selection directly, the following VBA Macro will ease your work.

Step 1: Select the range in which you will add specified text;

Step 2: Hold down the Alt + F11 keys in Excel, and it opens the Microsoft Visual Basic for Applications window.

Step 3: Click Insert > Module, and paste the following VBA code in the Module Window.

VBA for adding specified text at the beginning of each cell

Sub AppendToExistingOnLeft()
Dim c As Range
For Each c In Selection
If c.Value <> "" Then c.Value = "LSB " & c.Value
Next
End Sub

VBA for adding specified text at the end of each cell

Sub AppendToExistingOnRight()
Dim c as range
For each c in Selection
If c.value <> "" Then c.value = c.value & " LSB"
Next
End Sub

you can change the variable "LSB" of the above codeas.

Step 4: Press the F5 key to run this macro. And all of the cells will be added the value LSB before or after the cell contents.


arrow blue right bubble Add specified text to the beginning / end of all cells with Kutools for Excel

Kutools for Excel's Add Text tool will help you quickly add specified text to the beginning or end of each cell in a selection.

Kutools for Excel includes more than 120 handy Excel tools. Free to try with no limitation in 30 days. Get it Now.

Step 1: Select the range in which you will add specified text.

Step 2: Click the Kutools > Text Tools > Add Text…. See screenshot:

doc-add-text4

Step 3: In Add Text dialog box, enter the specified text in the Text box, and check the right option in Position section, such as Before first character, After last character, etc.

doc-add-text5

Step 4: Click OK or Apply. The specified value will be added before or after the cell contents. See screenshots:

Add the specific text before the cell contents
doc-add-text6
Add the specific text after the cell contents
doc-add-text7

Notes:

1. Kutools for Excel's Add Text tool allows you to preview the changes in selection in Preview section.

2. If you check the Skip non-text cells option, this tool won't add the specified text in cells with non-text content.

Please click here to know more about this Add Text feature.


Kutools for Excel

More than 120 Advanced Functions for Excel 2013, 2010, 2007 and Office 365.

screen shot

btn read more     btn download     btn purchase