Spreadsheet Practice

How to remove the first N characters from a cell in Excel

Formula (Excel and Google Sheets)

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

Keep everything except the first N characters: =RIGHT(A2,LEN(A2)-3), or =REPLACE(A2,1,3,"").

Result on the example
one result per row in B2, filled down to B7
Works in
Every current version
Google Sheets
Same formula

See it work

The formula is already in B2, filled down to B7. Change any input and the result updates, or edit the formula to experiment.

How it works

LEN gives the total length, so LEN(A2)-$E$1 is how many characters remain after the first N. RIGHT returns that many from the end. It works for codes of any length, like "US-104577" and "GB-4116".

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

Result"10442"

  1. A2"US-10442"

    The value in A2.

  2. LEN(A2)8

    LEN: Number of characters.

    • textA2"US-10442"
  3. $E$13

    The value in E1.

  4. LEN(A2)-$E$15

    The - operator subtracts.

  5. RIGHT(A2,LEN(A2)-$E$1)"10442"

    RIGHT: Characters from the end of text.

    • textA2"US-10442"
    • num_charsLEN(A2)-$E$15

In Google Sheets

The same formula works in Google Sheets: =RIGHT(A2,LEN(A2)-$E$1). We ran it in Google Sheets mode on the same data and it returns the same results.

Other ways to do it

Each one was run on the same example sheet.

FormulaResultWhen to use it
=REPLACE(A2,1,$E$1,"")10442, 20871, 30019…Replaces the first N characters with nothing. Shorter, and easy to read.
=MID(A2,$E$1+1,LEN(A2))10442, 20871, 30019…Starts one character after the ones you remove and takes the rest.

Common mistakes

  • If N is larger than the text, RIGHT gets a negative length and returns #VALUE!. REPLACE and MID return an empty text instead.
  • The result is text even when it looks like a number. Use =VALUE(RIGHT(A2,LEN(A2)-3)) for a number.

Try it yourself

Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.

Remove the first N characters from a cell

In B2, remove the first N characters from the code, where N is in E1, and fill down to B7.

Questions

How do I remove only the first character?

Use =MID(A2,2,LEN(A2)).

How do I remove the first characters only when they match a prefix?

Test first: =IF(LEFT(A2,3)="US-",MID(A2,4,LEN(A2)),A2).

Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.