Removing the first character in Excel is a common task when cleaning data, preparing reports, or standardizing text entries. Whether you need to strip an unwanted prefix, delete a leading space, or eliminate a specific symbol from thousands of cells, Excel offers several reliable methods that work without altering the original source until you decide to replace it. This guide walks you through the most effective techniques—formulas, VBA macros, and Power Query—so you can choose the approach that best fits your workflow and skill level.
Why You Might Need to Remove the First Character
Data imported from external systems often carries extra characters at the beginning of a string. Examples include:
- A leading apostrophe that forces Excel to treat numbers as text
- A uniform prefix like “ID_” or “USD” that you want to strip for analysis
- Unwanted spaces or special characters introduced during CSV export
By removing the first character, you normalize the dataset, making functions like VLOOKUP, SUMIF, or pivot tables work correctly. The techniques below preserve the rest of the string intact and can be applied to single cells, entire columns, or dynamic ranges.
Method 1: Using Excel Formulas
Formulas are the quickest way to strip the first character when you need a non‑destructive, recalculating solution. Three core functions—RIGHT, MID, and REPLACE—handle most scenarios.
1.1 RIGHT Function
The RIGHT function returns a specified number of characters from the end of a string. To drop the first character, you calculate the total length with LEN and then request all characters except the first one.
=RIGHT(A2, LEN(A2)-1)
- A2 – the cell containing the original text
- LEN(A2)-1 – total length minus one, telling RIGHT to keep everything but the leading character
Example: If A2 holds “#12345”, the formula returns “12345”.
1.2 MID Function
MID extracts a substring starting at any position you define. By starting at position 2, you automatically skip the first character Worth keeping that in mind..
=MID(A2, 2, LEN(A2)-1)
- 2 – start at the second character
- LEN(A2)-1 – number of characters to return (all except the first)
This method works identically to RIGHT but can be more intuitive when you think in terms of “start position”.
1.3 REPLACE Function
REPLACE lets you substitute a portion of a string with another string. To delete the first character, replace it with an empty string (“”) Easy to understand, harder to ignore..
=REPLACE(A2, 1, 1, "")
- 1 – the starting position (first character)
- 1 – number of characters to replace
- "" – replacement text (nothing)
REPLACE is especially handy when you later need to remove a variable number of leading characters; simply adjust the second argument.
Applying the Formula to a Column
- Insert a helper column next to your data (e.g., column B if your data is in A).
- Enter the chosen formula in B2.
- Drag the fill handle down to copy the formula for all rows.
- Copy the helper column, right‑click the original column, choose Paste Special → Values to overwrite the original data with cleaned text.
- Delete the helper column if desired.
Method 2: Using VBA Macro
When you need to remove the first character repeatedly across many sheets or workbooks, a VBA macro automates the process and can be tied to a button or keyboard shortcut That's the part that actually makes a difference..
2.1 Simple Macro for a Selected Range
Sub RemoveFirstCharacter()
Dim rng As Range
Dim cell As Range
On Error Resume Next
Set rng = Application.InputBox("Select the range to process:", _
"Remove First Character", Type:=8)
On Error GoTo 0
If rng Is Nothing Then Exit Sub
Application.ScreenUpdating = False
For Each cell In rng
If Not IsError(cell) And Not IsEmpty(cell) Then
If Len(cell.Value) > 0 Then
cell.Value = Mid(cell.Value, 2)
End If
End If
Next cell
Application.ScreenUpdating = True
MsgBox "First character removed from selected cells.", vbInformation
End Sub
How it works
- The macro prompts you to select a range.
- It loops through each cell, checks that the cell is not empty or an error, and uses Mid to return the substring starting at the second character.
- Screen updating is turned off to speed up processing on large ranges.
2.2 Adding the Macro to Your Workbook
- Press ALT + F11 to open the VBA editor.
- Choose Insert → Module and paste the code above.
- Close the editor.
- Run the macro via Developer → Macros, select RemoveFirstCharacter, and click Run.
- (Optional) Assign the macro to a shape or button on the sheet for one‑click access.
2.3 Advantages and Caveats
- Speed: Processes thousands of cells instantly.
- Undo: VBA changes cannot be undone with Ctrl+Z; always backup or work on a copy.
- Flexibility: You can easily modify the macro to remove a variable number of characters (
Mid(cell.Value, n+1)) or to target only cells that meet certain criteria (e.g., starting with a specific symbol).
Method 3: Using Power Query (Get & Transform)
Power Query excels at bulk data cleaning, especially when you need to apply the same transformation repeatedly as part of a data refresh workflow Worth keeping that in mind..
3.1 Loading Data into Power Query
- Select your table or range.
- Go to the Data tab and click From Table/Range (ensure “My table has headers” is checked if applicable).
- Excel opens the Power Query editor.
3.2 Removing the First Character
- Click the column header you want to modify.
- Choose Transform → Format → Extract → Extract Range.
- In the dialog, set Start at to 2 (second character) and leave Number of characters blank (or enter a large number) to extract to the end of the string.
- Click OK. Power Query inserts a step that effectively drops the first character.
Alternatively, you can use a custom column with the M formula:
= Text.Range([YourColumnName], 1,
…`Text.Range([YourColumnName], 1, Text.Length([YourColumnName]) - 1)`
This expression tells Power Query to start at the second character (index 1, because M is zero‑based) and return a substring whose length equals the original length minus one—effectively stripping the leading character. After entering the formula, click **OK**; Power Query adds a new column (you can rename it, e.Plus, g. , “Trimmed”). If you prefer to replace the original column, right‑click the new column, choose **Remove Columns**, then keep only the trimmed version.
### 3.3 Completing the Query
1. **Review the Applied Steps** pane to ensure the transformation looks correct.
2. Click **Home → Close & Load** to return the cleaned data to a worksheet (or to a data model, depending on your preference).
3. Whenever the source data changes, simply refresh the query (**Data → Refresh All**) and the first‑character removal will be reapplied automatically.
### 3.4 Advantages and Caveats of Power Query
- **Repeatability**: Ideal for recurring reports; the transformation is stored as part of the query and does not require manual re‑application.
- **Transparency**: Each step is logged, making it easy to audit or modify later.
- **Performance**: Handles large datasets efficiently because processing occurs in the Power Query engine, not within the worksheet cells.
- **Limitations**: Requires the data to be loaded into the query editor; very small, ad‑hoc tweaks may be faster with a formula or VBA. Additionally, Power Query does not support undo (Ctrl+Z) once the query is loaded, so keep a backup of the source table if you need to revert.
---
## Quick Comparison of the Three Approaches
| Method | Best For | Speed | Undo‑ability | Setup Complexity |
|--------|----------|-------|--------------|------------------|
| **Formula (MID/RIGHT/REPLACE)** | One‑off or occasional edits on modest ranges | Very fast for < 10 k cells | Native Excel undo | Low – just type a formula |
| **VBA Macro** | Large ranges, repetitive tasks, need for a button or shortcut | Extremely fast (screen updating off) | No native undo; work on a copy | Moderate – requires enabling macros |
| **Power Query** | Ongoing data pipelines, refreshable reports, combined with other transformations | Fast on big data; processing off‑sheet | No undo after load, but query steps are editable | Higher initial setup, but reusable |
Choose the technique that matches the frequency of the task, the size of your data, and your comfort level with Excel’s programming tools.
---
### Conclusion
Removing the leading character from text strings is a common cleaning need, and Excel offers three solid pathways to accomplish it. For quick, interactive fixes, a simple `MID`‑based formula does the job with full undo support. When you need to process thousands of cells repeatedly or want a one‑click solution, a lightweight VBA macro provides speed and flexibility—just remember to back up your data first. In practice, finally, if the operation is part of a larger data‑preparation workflow that will be refreshed over time, Power Query delivers a transparent, repeatable, and scalable solution. By matching the method to your specific context, you can keep your worksheets clean, efficient, and ready for analysis.