Remove First Two Characters from a Cell in Excel – 3 Formulas

Published on

To remove the first two characters (whether they are letters or digits) from a cell in Excel, you can use the MID+LEN, LEFT+LEN, or REPLACE function. I prefer the REPLACE function.

If the cell content is a number, you might also use the VALUE function to ensure the result remains in a numeric format.

Removing the First Two Letters

The following formulas will remove the first two characters (letters) from the text in cell A2:

  1. =IFERROR(RIGHT(A2, LEN(A2)-2), "")
    The LEN(A2)-2 part calculates the total number of characters in cell A2 and subtracts 2. The RIGHT function then extracts the remaining characters from the right, effectively removing the first two characters.
    This formula may return a #VALUE! error if the length of the string is less than 2. The IFERROR function handles this error by returning an empty string.
  2. =MID(A2, 3, LEN(A2))
    The MID function extracts the characters starting from the third character (position 3) to the end of the string, as determined by the LEN function.
  3. =REPLACE(A2, 1, 2, "")
    The REPLACE function removes 2 characters starting from the first character by replacing them with an empty string ("").

If the value in cell A2 is “NO145AZ1”, all of these formulas will return “145AZ1”.

Example

In the following examples, item codes are listed in the range A2:A10. Enter one of the formulas, preferably the REPLACE function, in cell C2 and drag it down to C10.

Replace the first two characters in Excel

If your version of Excel supports dynamic arrays, you can simply enter the following formula in cell C2:

=REPLACE(A2:A10, 1, 2, "")

The results will automatically spill down the column.

Now let’s see what changes we need to make to the formulas when you want to remove the first two digits.

Removing the First Two Digits

The formulas above remove the first two characters (letters or numbers). However, when the values are numbers, the output will be in text format.

To retain the numeric format, you should either multiply the result by 1 or use the VALUE function.

Assume cell A2 contains the number 123456. The output of the following formulas will be 3456 in number format.

=IFERROR(VALUE(RIGHT(A2,LEN(A2)-2)), 0)
=IFERROR(VALUE(MID(A2, 3, LEN(A2))), 0)
=IFERROR(VALUE(REPLACE(A2, 1, 2, "")), 0)

If the value is 5000, the result will be 0.

If cell A2 contains a number with fewer than 3 digits, the output will typically be an error. The IFERROR function replaces that error with 0.

Here is the recommended array formula to remove the first two digits for those using the latest versions of Excel with dynamic array support:

=IFERROR(VALUE(REPLACE(A2:A10, 1, 2, "")), 0)

Resources

Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Guide Prashanth KV brings a wealth of experience in Google Sheets and Excel, cultivated through years of work with multinational corporations in Mumbai and Dubai. As a recognized Google Product Expert in Docs Editors, Prashanth shares his expertise through insightful blogging since 2012. Explore his blog for practical tips and guidance on maximizing your spreadsheet skills.

Cycle Highlights in Google Sheets – Rotate Highlights Daily

Want to cycle highlights in Google Sheets every day? Whether you're rotating a meal...

Filter Rows Containing Multiple Selected Values in Google Sheets

This tutorial explains how to filter rows in a column containing multiple selected drop-down...

Two-Way Lookup with XLOOKUP in Google Sheets

When you need to look up one search key vertically and another horizontally, you...

How to Filter by Total in Google Sheets Pivot Tables

Google Sheets offers many tools to summarize and analyze data, but Pivot Tables are...

More like this

XLOOKUP with Match Mode 3 in Excel (Regex Match)

XLOOKUP becomes more powerful in Excel with the new match mode 3, which enables...

Hierarchical Number Sorting in Excel with Modern Functions

A hierarchical numbering system in Excel allows you to organize data into a clear,...

Dynamic Formula to Sum Every 7 Rows in Excel

To sum every 7 rows, you can use either a drag-down formula or a...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.