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

or

How to add prefix or suffix to range of cells in Excel?

Sometimes you need to add common text to the beginning or end of all cells in some cases. Of course, you can add the prefix or suffix to each cell one by one. However, work goes hard and time-consuming when there are numerous cells. This article will show you some tips about adding prefix or suffix to selected range of cells in Excel easily.

Add prefix or suffix to all cells with formulas

Add prefix or suffix to all cells with VBA

Add prefix or suffix to all cells with Kutools for Excel

Remove prefix or suffix from all cells in selection

Easily add common text to the beginning or end of all cells (prefix or suffix) in Excel

It’s easy to fill all cells with same content in a column with the AutoFill feature. But, how to add same prefix or suffix to all cells in a column? Comparing to type the prefix or suffix to each cell separately, Kutools for Excel’s Add Text utility provides an easy workaround to get it done with several clicks only. Full Feature Free Trial 30-day!
ad add text prefix suffix

Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words...
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum...
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns...
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Create Mailing List and Send Emails by Cell's Value...
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.

arrow blue right bubble Add prefix or suffix to all cells with formulas

The Excel's concatenate function can insert prefix or suffix for a single cell quickly.

1. Enter the function of =CONCATENATE("Food - ",A1) in a blank cell, says Cell C1, and then drag this cell's AutoFill handle across the range that you want to fill. And all of the cells have been added the specific prefix text. See screenshot:. See screenshot:

You can use the concatenate function to insert prefix, suffix, or both of suffix and prefix as follows:

Enter formulas Results in cells
= Concatenate ("Food - ", A1) Food - Apple
=Concatenate (A1, " - Fruit") Apple - Fruit
=Concatenate ("Food - ", A1, " - Fruit") Food – Apple - Fruit

arrow blue right bubbleAdd prefix or suffix to all cells with VBA

You can also deal with this problem with the following VBA code:

1. Select the range that you want to insert the prefix or suffix.

2. Click Developer > Visual Basic, and a new Microsoft Visual Basic for applications window will display, click Insert > Module, and then input the following code:

VBA: Add prefix to the text:

Sub AddTextOnLeft()
'Updateby20131128
Dim Rng As Range
Dim WorkRng As Range
Dim addStr As String
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
addStr = Application.InputBox("Add text", xTitleId, "", Type:=2)
For Each Rng In WorkRng
    Rng.Value = addStr & Rng.Value
Next
End Sub

VBA: Add suffix to the text:

Sub AddTextOnRight()
'Updateby20131128
Dim Rng As Range
Dim WorkRng As Range
Dim addStr As String
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
addStr = Application.InputBox("Add text", xTitleId, "", Type:=2)
For Each Rng In WorkRng
    Rng.Value = Rng.Value & addStr
Next
End Sub

3. Then click Run button or press the F5 key to run the VBA.

4. And now please specify the range you will add prefix or suffix for into the first KutoolsforExcel dialog box and click the OK button, and then type the suffix or prefix you will add into the second KutoolsforExcel dialog box and click the OK button. See below screenshots:
     
Now the specified suffix or prefix has been added into each selected cell as below screenshot shown:


arrow blue right bubble Add prefix or suffix to all cells with Kutools for Excel

You may be not familiar with functions and VBA code in Excel. And this Add Text utility of Kutools for Excel will help you insert prefix or suffix to any selected ranges quickly.

1.  Select the cells that you want to add prefix or suffix, and click  Kutools > Text > Add Text, see screenshot:

2. In the Add Text dialog box, enter your prefix or suffix in the Text box, check the Before first character option (for adding prefix) or After last character option (for adding suffix) as you need, and click the Ok button.
And now the specified prefix or suffix is adding to each selected cells at once. See screenshot:


arrow blue right bubbleDemo: add prefix or suffix to multiple cells with Kutools for Excel

In this Video, Kutools and Kutools Plus tabs are added by Kutools for Excel. If need it, please click for 30-day free trial without limitation!

Remove prefix or suffix (same number of characters) from beginning/right/end of cells in Excel

Kutools for Excel's Remove By Position feature eases you removing the prefix or suffix (certain number of characters) from beginning/end/specified position of text string in cells. Full Feature Free Trial 30-day!
ad remove prefix suffix

arrow blue right bubbleRelated articles:


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Pboro · 1 years ago
    How do I prefix a letter to a date in the format "Cmmddyy".

    Example. A1 contains date in format mm/dd/yy (let's say 01/31/18)

    I want A2 to show "C013118".
    • To post as a guest, your comment is unpublished.
      Vasudeva · 23 days ago
      Use this formula in A2:
      =IF(A1<>"","C"&IF(MONTH(A1)>=10,MONTH(A1),"0"&MONTH(A1))&DAY(A1)&RIGHT(YEAR(A1),2),"")
  • To post as a guest, your comment is unpublished.
    daniyal ejaz · 2 years ago
    Hi,

    does any one how to add two numbers in one cell.
    For example,

    X
    2.2
    3.6
    0.9
    1.2

    and I want to add each number with its rank,

    Like;
    X
    2.2 (2)
    3.6 (1)
    0.9 (4)
    1.2 (3)
    and these rank must be bold and with different colour.
  • To post as a guest, your comment is unpublished.
    SANDEEP · 2 years ago
    thanks very much for KUTOOLS FOR EXCEL
  • To post as a guest, your comment is unpublished.
    Jasvanthi · 2 years ago
    I have filtered the cloumn and i have to apply TC001 till TC0209 on the filtered cells, could anyone please help me with this
  • To post as a guest, your comment is unpublished.
    Rajendra · 3 years ago
    i have single alphabets in different cell, say 10 cell with different....how can add these alphabets in one cell i.e. total no. of alphabets in one cell
  • To post as a guest, your comment is unpublished.
    sayad · 3 years ago
    arihhurthj
    hshsjsyshsj
    shshydjdj
    shshssj
    shshdj
    shshjddj

    Please tell me how to add new line with character GO after every line.
  • To post as a guest, your comment is unpublished.
    Fayyaz · 3 years ago
    Need Help,
    I want to add character in Excell
    Example
    Cell No A1 Show A so next cell A2 show B
    I want to show B in next cell
  • To post as a guest, your comment is unpublished.
    Glynis · 3 years ago
    Thank you so much :)
  • To post as a guest, your comment is unpublished.
    I wants to add text · 3 years ago
    e.g

    44444

    Out I needed as DL/44444
  • To post as a guest, your comment is unpublished.
    man in · 4 years ago
    you can also use this site
  • To post as a guest, your comment is unpublished.
    Rich · 4 years ago
    I can't concatenate a date, (excel tries to divide it like a sum).
    I have tried changing the format of the source cell and the destination, nothing will stop concatenate from dividing the date.
    I don't want to buy Kutools either. (I know there is a free trial but that is not a long term solution).
  • To post as a guest, your comment is unpublished.
    Ng · 4 years ago
    maria,
    you can edit the code by adding:
    Dim OriValue As String

    then add this code after For Each....
    OriValue = Rng.Value
    and change the Rng.Value to OriValue in equation:
    Rng.Value = addStr & OriValue
    • To post as a guest, your comment is unpublished.
      Ajay · 4 years ago
      i have a data where in column there are no,s like this
      rs 10
      rs 20
      rs 30
      rs 40
      Please let me know how can i sum them without removing "rs" from entire column
  • To post as a guest, your comment is unpublished.
    maria · 5 years ago
    if our prefix was number,how can insert it to cells contain number?
  • To post as a guest, your comment is unpublished.
    Simensch · 5 years ago
    Thanks!
    = CONCATENATE made my day!
  • To post as a guest, your comment is unpublished.
    Vishal · 5 years ago
    CAn i add KUltools without admin rights
    • To post as a guest, your comment is unpublished.
      Admin_jay · 5 years ago
      [quote name="Vishal"]CAn i add KUltools without admin rights[/quote]
      :-) You need to install the software with an admin account. After the installation, you can use it without admin account.
  • To post as a guest, your comment is unpublished.
    John Graf · 5 years ago
    Thank you, the above instructions have saved me hours of work.
  • To post as a guest, your comment is unpublished.
    The O · 5 years ago
    Thanks, Kutools saved me a lot of work :-)