How to Add Characters in Excel (with Formula, Flash Fill & VBA)

Here’s an overview of a method where characters are added using Flash Fill.

Overview of using the Falsh Fill feature to add characters in Excel


Download the Practice Workbook


5 Easy Ways to Add Characters in Excel

We have data in existing cells that contain names. We want to put a prefix at the beginning of each cell, a suffix at the end, or some text in front of a formula.

Sample dataset containing Guest list


Method 1 – Using the Ampersand Operator (&) to Add Characters

Steps:

  • Click on the first cell of the column where you want the converted names to appear (C5).
  • Type an equal sign (=), input or paste the text you want to use as the beginning, such as “Professor ”, then insert an ampersand (&).
  • While still in the formula bar, select the cell containing the first name (B5).
  • Here’s the resulting formula.
="Professor "& B5
  • Press Enter to apply the formula.

Using the ampersand operator to append character

  • Drag the fill handle to cell C12.


Method 2 – Using the CONCATENATE Function to Add Characters

Case 2.1 – CONCATENATE to Add Characters to the Beginning of all Cells

Steps:

  • Click on the first cell of the column where you want the converted names to appear (F5).
  • Type equal sign (=) to type formula.
  • Enter the function CONCATENATE and select it from the suggested formulas.
  • Type the text you want to append (such as “Professor ”) in double quotes, followed by a comma (,).
  • Select the cell containing the first name (E5).
  • Place a closing bracket.
  • In our example, the formula should be:
=CONCATENATE("Professor ", E5)

putting word infront of the text value using the CONCATENATE Function

  • Press Enter.
  • Drag down the fill handle.

dragging the Fill handle to cell F12


Case 2.2 – CONCATENATE to Add Characters to the End of all Cells

Steps:

  • Click on the first cell of the column where you want the converted names to appear (C5 in our example).
  • Type an equal sign (=) to start the formula.
  • Enter the function CONCATENATE.
  • Select the cell containing the first name (B5 in our example).
  • Insert a comma followed by the text in double quotes (“ (USA)”).
  • Place a closing bracket.
  • In our example, the formula should be:

Formula Text

=CONCATENATE(B5, " (USA)")

Entering the first name with joined character

  • Press Enter.
  • Drag down the fill handle.

using the autofull feature to fill the range of cell C5:C12 with joined characters


Method 3 – Using Flash Fill to Add Characters in Excel

Flash Fill is available in Excel 2013 and newer versions.

Case 3.1 – Flash Fill to Add Text to the Beginning of all Cells

Steps:

  • Click on the first cell of the column where you want the converted names to appear (F5).
  • Manually type in the text you want to add (such as “Professor ”), followed by the first value from your list.
  • Press Enter.

Enter the primary name in the cell C5

  • There is plus sign in the corner of the C5 cell.
  • Right-click and hold on the fill handle, then drag down.

fill handle icon in the corner of the cell C5

  • Release the right-click and select Flash Fill.

releasing the fill handle to open the flash fill menu

  • This will copy the same pattern to the rest of the cells in the column.

dragging the fill handle to cell C12 to fill the range of cell C5:C12 with joined characters


Case 3.2 – Flash Fill to Add Text to the End of all Cells

Steps:

  • Click on the first cell of the column where you want the converted names to appear (C5).
  • Type in the resulting text you need.
  • Press Enter.
  • Click on cell C5 again.
  • Under the Data tab, click on the Flash Fill button.

using the flash fill from the data tab

  • This will copy the same pattern to the rest of the cells in the column.

range of cell B5:C12 with joined characters

In some cases, you may need to enter the second value as well for Excel to pick up the pattern correctly.


Method 4 – Add Characters in Excel Before or After Specific N-th Character

Steps:

  • If you want to add a hyphen (-) after the 5th character between the words James and (USA) from cell B5, enter the following formula:
=CONCATENATE(LEFT(B5, 5), "-", RIGHT(B5, LEN(B5) -5))
  • Press Enter to see the result.

  • You will have to modify the formula for each cell individually to separate the words since the formula puts the hyphen as the sixth character regardless. For example, using the Fill Handle for C11 results in “Danie-l(USA)” since “Daniel” is six characters long.


Method 5 – VBA to Add Specified Character to All Cells

Case 5.1 – VBA for Adding a Specific Character at the Beginning of Each Cell

Steps:

  • Select the range (E5:E12) in which you get the results.
  • Press Alt + F11, and Excel will open the Microsoft Visual Basic for Applications window.
  • Click on Insert then on Module.
  • Paste the following VBA code in the Module Window.
Sub AppendToExistingOnLeft()
Dim c As Range
For Each c In Selection
If c.Value <> "" Then c.Value = "Professor " & c.Value
Next
End Sub

Method 5: VBA to Add Specified Character to All Cells

  • Press the F5 key to run this macro. The cells from C5:C12 will have the text “Professor ” appended to them, and the results shown in E5:E12.

Method 5: VBA to Add Specified Character to All Cells


Case 5.2 – VBA for Adding Specific Text at the End of Each Cell

Steps:

  • Copy the values from B5:B12 to C5:C12.
  • Select the range (C5:C12).
  • Press Alt + F11 to open the Microsoft Visual Basic for Applications window.
  • Click on Insert then on Module.
  • Paste in the following VBA code.
Sub AppendToExistingOnRight()
Dim c as range
For each c in Selection
If c.value <> "" Then c.value = c.value & "(USA)"
Next
End Sub

Method 5: VBA to Add Specified Character to All Cells

  • Press the F5 key to run the macro.

final output showing the characters been added infront of the country name


Related Articles

Get FREE Advanced Excel Exercises with Solutions!
Bhubon Costa
Bhubon Costa

Bhubon Costa, B.Sc. in Naval Architecture & Marine Engineering from Bangladesh University of Engineering & Technology, has worked with the ExcelDemy since 2021. Currently, he has been working as a reviewer. Notably, he has written over 90 articles and led several VBA content development teams. He has a great passion for the fields of data analytics and data science. His areas of expertise include Excel VBA, Power Query, Pivot Table, Power BI, MySQL, PostgreSQL, machine learning, and Python... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo