How to Add Text to Beginning of Cell in Excel (7 Easy Methods)

When managing spreadsheets, it’s common to need a prefix added to the beginning of existing data. You might want to label items like “Verified-101,” organize employee IDs as “EMP-123,” or distinguish project names with custom tags. Instead of manually editing each entry, Excel provides several effective ways to add text at the start of a cell. From basic formulas to advanced features like Flash Fill, cell formatting, and VBA scripting, there’s a method for every skill level and use case.

In this article, we’ll learn several practical ways to add text to the beginning of cells in Excel along with step-by-step instructions. Whether you’re working with names, codes, or values, these methods will help you update your data quickly and efficiently.

Key Takeaways

Steps to add text to beginning of cell in Excel:

➤ Select a blank cell next to the one you want to modify (e.g., cell C2).
➤ Type the following formula:
=”Emp-“&B2
Here, the value from cell B2 will be combined with the prefix “EMP-“.
➤ Press Enter to apply the formula.
➤ Drag the fill handle down to apply the formula to the other rows in the column.

overview image

Download Practice Workbook
1

Use the Ampersand (&) Operator to Add Text at the Start of a Cell

The ampersand (&) operator is a simple yet powerful way to join text in Excel. By using it at the beginning of a formula, you can easily add a prefix before the content of another cell. This method is highly flexible, works with both text and numbers, and doesn’t require any advanced functions or tools.

Let’s use a simple dataset of employee IDs and names. Each employee has a unique numeric ID listed in column A. Our goal is to add the text “EMP-” at the beginning of each ID so it becomes something like EMP-101, EMP-102, and so on. This is a common task when formatting employee codes or tagging data for tracking.

Use the Ampersand (&) Operator to Add Text at the Start of a Cell

Steps:

➤ Select a blank cell next to the one you want to modify (e.g., cell C2).
➤ Type the following formula:

=”Emp-“&B2

Here, the value from cell B2 will be combined with the prefix “EMP-“.

➤ Press Enter to apply the formula.
➤ Drag the fill handle down to apply the formula to the other rows in the column.

Use the Ampersand (&) Operator to Add Text at the Start of a Cell

Now we have successfully added a custom text at the beginning of each cell in our dataset.


2

Apply CONCAT or CONCATENATE Function

This technique uses CONCAT or CONCATENATE function to join text and cell values in Excel. CONCAT function is recommended for modern Excel versions, while CONCATENATE function works in older versions. These functions are useful when you want to prefix a string like “EMP-” to your existing cell data without altering the original value.

Steps:

➤ Select an empty cell next to your ID column, such as cell C2.
➤ To use the CONCAT function, type the following formula in Excel 365:

 =CONCAT(“EMP-“, B2)

➤ Press Enter.
➤ Drag the fill handle down from C2 to apply the formula to all rows.

Apply CONCAT or CONCATENATE Function to Add Text to the Beginning of a Cell in Excel

➤ Alternatively, if you’re using an older Excel version, enter this formula:

=CONCATENATE(“EMP-“, B2)

Apply CONCAT or CONCATENATE Function to Add Text to the Beginning of a Cell in Excel

This method gives you a clean and structured way to build prefixed IDs like EMP-101, EMP-102, and so on, using either modern or legacy Excel functions.


3

Add Text to the Beginning of a Cell with Flash Fill

If you prefer not to use formulas, Excel’s Flash Fill feature is a fast and intelligent way to add text like “EMP-” to the beginning of every cell. It works by recognizing patterns in your data and automatically applying that pattern to the rest of the column. This is especially useful when you’re working with ID numbers, labels, or consistent prefixes, and you want to avoid manual entry or formula creation.

Steps:

➤ In a blank column next to your employee IDs (e.g., cell B2), manually type the desired result, such as EMP-101.
➤ Press Enter, then go to the Data tab and click Flash Fill under Data Tools, or simply press  Ctrl  +  E  .

Add Text to the Beginning of a Cell with Flash Fill

Excel will instantly fill down the rest of the column by following the pattern you started.

Add Text to the Beginning of a Cell with Flash Fill

This method is ideal for non-technical users who want a clean, one-click solution for structured prefixes like EMP-101 to EMP-110.


4

Insert REPLACE Function to Add Text at the Beginning

The REPLACE function is typically used to substitute part of a text string, but it can also be cleverly used to add a prefix by replacing zero characters at the start of a cell. This method is particularly helpful when you want more control over the insertion point within the text. Our goal is to add a custom text like “EMP-” at the beginning of each cell.

Steps:

➤ Select a blank cell next to your data (e.g., in column C).
➤ Enter the following formula:

=REPLACE(B2,1,0,”EMP-“)

➤ Press Enter.
➤ Drag the fill handle down to apply the formula to the rest of the cells.

Insert REPLACE Function to Add Text at the Beginning

Here, “EMP-“ is added starting at position 1, and 0 characters are replaced by effectively inserting the prefix in front of the original value.


5

Add a Prefix with a Delimiter Using TEXTJOIN Function

The TEXTJOIN function allows you to combine multiple text values into one, using a specified delimiter. It’s especially useful when you want to insert a prefix consistently and optionally handle blank values. Our goal is to add a custom text like “EMP-” at the beginning of each cell.

Steps:

➤ Select a blank cell next to your employee IDs (e.g., in column C).
➤ Enter the following formula:

=TEXTJOIN(“”, TRUE, “EMP-“, B2)

Here, we’re joining “EMP-” with the value in B2 without any delimiter (“”), and TRUE tells Excel to ignore any blank cells in the range.

➤ Press Enter.
➤ Drag the fill handle down to apply it to the rest of the cells.

Add a Prefix with a Delimiter Using TEXTJOIN Function

This method offers flexibility if you plan to join more than two elements or conditionally include parts of the text.


6

Custom Number Formatting to Add a Visual Prefix

Sometimes, you might want to add a prefix like “EMP-” or a symbol before numbers in Excel without actually changing the cell’s value. This is especially useful when you need to keep the original data intact for calculations but want to improve readability or highlight certain values visually. Custom number formatting lets you do this by modifying only how the data appears, not the data itself.

Steps:

➤ Select the target cell or range of cells where you want to add the prefix such as B2:B11.

Custom Number Formatting to Add a Visual Prefix

➤ Press  Ctrl  +  1  to open the Format Cells dialog box.
➤ Click on the Number tab.
➤ Select Custom from the category list on the left.
➤ In the Type field, enter a custom format code such as “EMP-“# to display “EMP-” before the number.
➤ Click OK to apply the format.

Custom Number Formatting to Add a Visual Prefix

Now you have your custom text at the start of each cell in your selected range.

Custom Number Formatting to Add a Visual Prefix

Note:
This method only changes the cell’s display; the actual value remains unchanged and the prefix should be limited to 2–3 characters for a clean appearance.


7

Running VBA Macro to Add Prefixes in an Adjacent Column in Excel

When you need to add a prefix to a large range of cells efficiently, using a VBA macro can automate the process. This method places the prefixed text in the column right next to your original data, leaving your original values intact while creating a new set with the prefix attached. Our goal is to add a custom text like “EMP-” at the beginning of each cell.

Steps:

➤ Press  Alt  +  F11  to open the VBA Editor.
➤ In the VBA Editor, click Insert >> Module to add a new module.
➤ Copy and paste the following VBA code into the module window:

Sub AddTextBefore()
    Dim cls As Range
    For Each cls In Application.Selection
        If cls.Value <> "" Then cls.Offset(0, 1).Value = "EMP-" & cls.Value
    Next
End Sub

Running VBA Macro to Add Prefixes in an Adjacent Column in Excel

➤ Close the VBA Editor.
➤ In Excel, select the range of cells where you want to add the prefix.
➤ Run the macro by pressing  Alt  +  F8  , selecting AddTextBefore, and clicking Run.

Running VBA Macro to Add Prefixes in an Adjacent Column in Excel

This macro adds the prefix “EMP-” before each cell’s content and places the result in the adjacent column to the right.

Running VBA Macro to Add Prefixes in an Adjacent Column in Excel

Note:
Your data may appear unformatted. You need to format it manually.


Frequently Asked Questions

Can I add different prefixes to different cells at the same time using these methods?

While formulas and Flash Fill are ideal for applying the same prefix across many cells, adding different prefixes simultaneously requires manual input or a more advanced VBA macro customized for each unique prefix.

Does using custom number formatting to add a prefix affect Excel calculations or data integrity?

No, custom number formatting only changes how the value appears visually. The underlying data remains unchanged, so all formulas and calculations referencing these cells will work exactly as if no prefix is displayed.

Are these methods compatible with both text and numeric data types in Excel?

Yes, all the methods discussed such as formulas, Flash Fill, custom formatting, and VBA work well with both text and numbers. This flexibility makes it easy to add prefixes regardless of your data type.

If I add prefixes using formulas, how can I revert to the original data without prefixes?

Since formulas generate the prefixed results in separate cells, simply delete or clear those cells. The original data in the source cells remains unchanged, so no data loss occurs when removing the formula output.

Is it safe to use VBA macros to add prefixes, and what precautions should I take?

VBA macros are generally safe if you trust the source and understand the code’s purpose. Always review macros before running, avoid enabling macros from unknown files, and save your workbook before running scripts to prevent accidental data loss.


Wrapping Up

In this tutorial, we learned seven easy and effective methods to add text to the beginning of cells in Excel. Whether you prefer quick formulas, Flash Fill, custom formatting, or automation with VBA, each technique helps us efficiently add prefixes like EMP- to our data without manually editing each entry. Feel free to download the practice file and share your feedback.

ExcelInsider Team
We will be happy to hear your thoughts

Leave a reply

Excel Insider
Logo