ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Text
  3. Remove the First or Last Characters in Excel

Remove the First or Last Characters in Excel

By ExcelReady Team·Updated November 1, 2026·6 min read

The short answer

To remove the first character in Excel, keep everything except it: =RIGHT(A2,LEN(A2)-1). LEN counts the characters and RIGHT keeps all but one from the end. To remove the last character, use =LEFT(A2,LEN(A2)-1). Change the 1 to any number to remove more characters, for example =RIGHT(A2,LEN(A2)-3).

Key takeaways

  • Remove the first character with =RIGHT(A2,LEN(A2)-1); remove the last with =LEFT(A2,LEN(A2)-1).
  • Change the 1 to remove more characters, or point it at a cell that holds the number.
  • =REPLACE(A2,1,1,"") and =MID(A2,2,LEN(A2)) also remove the first character.
  • The result is text, so wrap it in VALUE if you need a number you can add up.
  • An empty cell makes LEN(A2)-1 negative and returns #VALUE!; guard it with IF(A2="","",...).
On this page+
  1. How do you remove the first character in Excel?
  2. Two other ways to drop the first character
  3. How to remove the last character
  4. How to remove the first or last N characters
  5. Why does the formula return #VALUE! or the wrong result?
  6. Can you remove characters without a formula?
  7. Practise it

To remove the first character in Excel, you don't delete anything. You keep everything except that character with =RIGHT(A2,LEN(A2)-1). The same idea, turned around, removes the last character: =LEFT(A2,LEN(A2)-1). This guide shows both, how to remove any number of characters, and how to avoid the errors that come from empty cells.

How do you remove the first character in Excel?#

Combine RIGHT and LEN: LEN counts the characters, and RIGHT keeps all of them except one. Here is the formula:

Excel formula
=RIGHT(A2,LEN(A2)-1)

Read it from the inside out:

PartWhat it doesFor X10432
LEN(A2)Counts the characters in A26
LEN(A2)-1One fewer than the total5
RIGHT(A2,5)Keeps the last 5 characters10432

The result is 10432. Because the formula works out the length for each cell, it works on text of any length. Fill it down (Windows: Ctrl+D; Mac: ⌘D) and every row loses exactly one character from the start.

If you are new to these functions, the guide to LEFT, RIGHT and MID for pulling out part of a cell explains each one with simple examples.

Two other ways to drop the first character#

REPLACE and MID give the same result, and some people find them easier to read. All three formulas below turn X10432 into 10432:

FormulaHow it works
=RIGHT(A2,LEN(A2)-1)Keeps all characters except the first
=REPLACE(A2,1,1,"")Replaces 1 character at position 1 with nothing
=MID(A2,2,LEN(A2))Starts reading at character 2 and takes the rest

REPLACE is the shortest: start at position 1, replace 1 character, put in "" (empty text). MID asks for more characters than are left, which is fine. MID simply stops at the end of the text.

Pick one and use it consistently. In a job test, RIGHT with LEN is the version examiners most often expect, because it shows you understand how LEN feeds the length.

How to remove the last character#

Swap RIGHT for LEFT to keep everything except the last character:

Excel formula
=LEFT(A2,LEN(A2)-1)

This is useful for trailing punctuation or unit letters. To drop a two-letter unit such as kg, remove 2 characters instead of 1. Here are some common cases:

A2FormulaResult
Invoice;=LEFT(A2,LEN(A2)-1)Invoice
125kg=LEFT(A2,LEN(A2)-2)125
[Draft]=MID(A2,2,LEN(A2)-2)Draft

The last row removes the first and the last character at once. MID starts at character 2 and takes the total length minus 2, which leaves out both ends.

How to remove the first or last N characters#

Change the 1 in the formula to however many characters you want to remove. To remove the first 3 characters of US-40512:

Excel formula
=RIGHT(A2,LEN(A2)-3)

The result is 40512. To make the number easy to change, put it in a cell, say E1, and lock it with dollar signs:

Excel formula
=RIGHT(A2,LEN(A2)-$E$1)

Now one edit in E1 updates every row. This works well when a data export adds a fixed prefix, such as a country code, that you need to strip.

Remove the first character only if it is a certain character#

Sometimes only some rows have the unwanted character. A list might mix X10432 with 20519, and you want to strip the X only where it exists. Check the first character with LEFT inside IF:

Excel formula
=IF(LEFT(A2,1)="X",RIGHT(A2,LEN(A2)-1),A2)

If the first character is X, the formula removes it. If not, it returns the cell unchanged. The check is not case-sensitive, so a lowercase x is removed too. This is safer than removing one character from every row and losing a real digit by mistake.

When the part you want to remove is not a fixed length, such as everything before a dash, counting won't work. Use a delimiter instead: the comparison of LEFT and TEXTBEFORE for text before a character shows when each is better. The guide to removing unwanted characters with SUBSTITUTE covers characters that can appear anywhere in the cell.

Why does the formula return #VALUE! or the wrong result?#

Most problems come from cells that are shorter than you think, or longer. Check these:

  1. Empty cells. If A2 is blank, LEN(A2)-1 is -1. RIGHT and LEFT can't take a negative length, so Excel shows #VALUE!. Guard against it:

    Excel formula
    =IF(A2="","",RIGHT(A2,LEN(A2)-1))
  2. Hidden spaces. A leading space counts as a character, so the formula removes the space instead of the letter. Clean the text first: =RIGHT(TRIM(A2),LEN(TRIM(A2))-1). To check the length of a cell, the guide on counting characters with LEN helps.

  3. Numbers that won't add up. RIGHT, LEFT, MID and REPLACE always return text. 10432 sits on the left of the cell and SUM ignores it. Wrap the formula in VALUE to get a real number: =VALUE(RIGHT(A2,LEN(A2)-1)).

  4. Numbers with formatting. If A2 is a number shown as $1,250.00, LEN counts the stored value 1250, not what you see. Text functions work on the stored value.

Can you remove characters without a formula?#

Yes. Flash Fill copies a pattern you type. Type 10432 next to X10432, select the cell below, and press Ctrl+E on Windows (or use Data > Flash Fill, which works on both Windows and Mac). Excel fills the rest of the column.

Flash Fill gives you fixed values, not formulas, so the results don't update if the source changes. It also guesses the rule from your examples, so scan the results before you trust them. For data that changes, or for a test that asks for a formula, use RIGHT and LEN.

Practise it#

Removing characters is a small skill that shows up in data-cleaning tasks and job tests all the time. Practise LEFT, RIGHT, MID and LEN in a live spreadsheet: you type the formula, and it checks your answer instantly. For quick syntax reminders, keep the RIGHT function guide, the LEFT function guide and the LEN function guide open while you work, or try the exercise on this page first.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Each ID has a letter X in front that the new system doesn't want. Click B2 and remove the first character from A2 with RIGHT and LEN, then press Enter.

fx
ABCD
1
Raw ID
Clean ID
2
X10432
3
X20519
4
X30077
5
X41180
6
X52046
7
8
9

Tip: LEN(A2) counts all six characters. Keep one fewer than that from the right.

Practise this in a lesson

LessonLEFT, RIGHT, MID and LENSplit product codes and IDs into their parts by taking characters from the start, end or middle of the text.Function guideRIGHTTake the last characters of a cell with Excel's RIGHT: account digits, file extensions and size codes. Examples, pitfalls and live practice.Function guideLEFTPull the first characters from a cell with Excel's LEFT: prefixes, initials and first names. Examples, pitfalls and live practice.Function guideLENCount characters with Excel's LEN: check length limits, find stray spaces and count commas with SUBSTITUTE. Examples and a live exercise.

Frequently asked questions

How do I remove the first character from a cell in Excel?

+

Use =RIGHT(A2,LEN(A2)-1). LEN counts all the characters, and RIGHT keeps all of them except the first one. =REPLACE(A2,1,1,"") gives the same result.

How do I remove the last character in Excel?

+

Use =LEFT(A2,LEN(A2)-1). It keeps every character from the start except the last one. Change the 1 to 2 or 3 to remove more.

How do I remove the first 3 characters in Excel?

+

Use =RIGHT(A2,LEN(A2)-3), or =MID(A2,4,LEN(A2)) to start reading at the fourth character. Both drop the first three characters.

Why does my formula return #VALUE!?

+

The cell has fewer characters than you are removing, often because it is empty. LEN(A2)-1 becomes negative, and RIGHT and LEFT cannot take a negative length. Wrap the formula in IF(A2="","",...) or IFERROR.

Can I remove characters without a formula?

+

Yes. Type the cleaned value next to the first row and use Flash Fill (Ctrl+E on Windows) to copy the pattern down. Check the results, because Flash Fill guesses the rule from your example.

Sources

  • RIGHT, RIGHTB functions - Microsoft Support
  • LEFT, LEFTB functions - Microsoft Support
  • LEN, LENB functions - Microsoft Support

Written and checked by the ExcelReady Team. First published November 1, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. How do you remove the first character in Excel?
  2. Two other ways to drop the first character
  3. How to remove the last character
  4. How to remove the first or last N characters
  5. Why does the formula return #VALUE! or the wrong result?
  6. Can you remove characters without a formula?
  7. Practise it

Keep reading

Text· 7 min read

Count Characters and Words in a Cell in Excel

To count characters in a cell, use =LEN(A2). It counts every letter, digit, space and symbol. To count one character, subtract the length without it: =LEN(A2)-LEN(SUBSTITUTE(A2,",","")). To count words, count the spaces in the trimmed text and add 1: =LEN(TRIM(A2))-LEN(SUBSTITUTE(TRIM(A2)," ",""))+1.

Text· 6 min read

How to Remove Characters From Text in Excel

To remove a specific character, use SUBSTITUTE to replace it with nothing: =SUBSTITUTE(A2,"-","") strips every dash. To remove characters by position, use RIGHT(A2,LEN(A2)-3) to drop the first three, or LEFT(A2,LEN(A2)-2) to drop the last two. To remove everything after a character, use TEXTBEFORE or LEFT with FIND.

Text· 6 min read

LEFT, RIGHT and MID in Excel: Pull Out Part of a Cell

LEFT, RIGHT and MID pull part of the text out of a cell. LEFT(text, num_chars) takes characters from the start, RIGHT(text, num_chars) takes them from the end, and MID(text, start_num, num_chars) takes them from any position. For TX-ELC-40512, LEFT(A2,2) gives TX, MID(A2,4,3) gives ELC and RIGHT(A2,5) gives 40512.

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free