Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or
0
0
0
s2smodern

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 Excelgood idea3

Add specified text to the specified position of all cells with Kutools for Excelgood idea3

add same text to a specific location of each cell in Excel

How could you add text or characters to the beginning of multiple cells, or add text or characters to the end of cells or insert text or characters between existing text? With Add Text utility of Kutools for Excel, you can quickly apply the following operations: . Click for 60 days free trial!
doc add text 6
 
Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days.

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

Tabbed browsing & editing multiple Excel workbooks/Word documents as Firefox, Chrome, Internet Explore 10!

You may be familiar to view multiple webpages in Firefox/Chrome/IE, and switch between them by clicking corresponding tabs easily. Here, Office Tab supports similar processing, which allow you to browse multiple Excel workbooks or Word documents in one Excel window or Word window, and easily switch between them by clicking their tabs. Click for free trial of Office Tab!

ot excel

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:"&A2 in Cell C2, and then drag the fill handle down to the cells you want to aply this formula. And the specific text has been added before all of the cells, see screenshot:

doc add specific text 1

Method 2: Concatenate formula

Enter the =Concatenate ("Class A:", A2) in Cell C2, and then drag and copy this formula to the cells you want to use, see screenshot:

doc add specific text 2

Notes:

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

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

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


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.

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

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

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

VBA: 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 = "CN- " & c.Value 
Next
End Sub

4. Press F5 key to run this macro. And all of the cells will be added the value CN- before the cell contents.

doc add specific text 3

Notes: 1. To add some specific text at the end of each cell, please apply the following VBA code.

VBA: 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 & "-CN" 
Next
End Sub

And you will get the following result:

doc add specific text 4

2. you can change the variable "CN-" or "-CN" of the above codes.


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, with more than 200 handy functions, makes your jobs easier. 

After installing Kutools for Excel, please do as below:(Free Download Kutools for Excel Now!)

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

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

doc add specific text 11

3. In Add Text dialog box, enter the text you need to add in the Text box.

(1.) If you check Before first character from the Position section, and the specific text will be added in front of all the cell values, see screenshot:

doc add specific text 6

(2.) If you check After last character from the Position section, and the specific text will be added at the end of the cell values, see screenshot:

doc add specific text 7

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.

Click Download and free trial Kutools for Excel Now !


Add specified text to the specified position of all cells with Kutools for Excel

Applying Kutools for Excel's Add Text function, you can not only add the specified text to the beginning or end of the cells, but also you can add the specified text to the specified position of the cells.

1. Select a range you want to add text to, and then click Kutools > Text > Add Text.

2. The Add Text dialog will be displayed, and enter the specified text and specify the certain position which you want to insert the text in the boxes. See screenshot:

Here I type 3 into the Specify textbox means that add text after the third character of the string.

doc add specific text 8

3. Click Ok or Apply. The specified text has been added to the specified position of the cells. See screenshot:

doc add specific text 9

Tip:

(1) In Specify textbox, you can type numbers with comma separate to add text in multiple position at the same time.
doc add specific text 12

(2)If you want to add text before every uppercase letter, the 1st letter is uppercase option in Add Text utility can help you.
doc add specific text 10

Also, you can add text before every lowercase letter, or every number letter.

Click Download and free trial Kutools for Excel Now !


Demo: Add text to the beginning or end of all cells

Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download and free trial Now!


Easily add hours/minutes/seconds to a datetime in Excel

Supposing you have a date time format data in a cell, such as 2015/5/3 17:53:20, and now you need to add a number of hours, minutes, or seconds to this date. Normally, using formula is the first method for all Excel users, but it’s hard to remember all formulas. With Kutools for Excel’s built-in Commonly-used Formulas you can easily add hours, minutes or seconds to a date time with formulas, and you don’t need to remember the formula at al. Click for 60 days free trial!
doc add hour minute second
 
Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days.

Relative articles:


Recommended Productivity Tools

Office Tab

gold star1 Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.

Kutools for Excel

gold star1Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!

gold star1300 New Features for Excel, Make Excel Much Easy and Powerful:

  • Merge Cell/Rows/Columns without Losing Data.
  • Combine and Consolidate Multiple Sheets and Workbooks.
  • Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
  • Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
  • More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...

Screen shot of Kutools for Excel

btn read more      btn download     btn purchase

Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
People in conversation:
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    algae · 3 years ago
    hi,
    my workbook has 60 sheets. i want to add a column A in sheets 5 to 56 and insert the name of the worksheet in each cell of col A . Each sheet has 150 rows, so 150 cells A1-A150.

    would greatly appreciate a vba soln

    tnx
  • To post as a guest, your comment is unpublished.
    scott aramaki · 3 years ago
    This was EXTREMELY helpful. And I don't use all caps very often.
  • To post as a guest, your comment is unpublished.
    Deepak Sadanand · 3 years ago
    Thank you. Helped with what I was looking for.
  • To post as a guest, your comment is unpublished.
    Shaun · 4 years ago
    I am trying the VBA, says its running. But its for 63,000 rows. Will this take a ton of time (an hour so far). That normal?
  • To post as a guest, your comment is unpublished.
    Miss Bunny · 4 years ago
    Thanks mch . It helped me a lot :)