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.

Using OFFSET and MATCH Together in Google Sheets: Advanced Tips

One powerful and flexible way to look up values is by combining the OFFSET...

How to Use OFFSET and XMATCH Functions Together in Excel

We often use the OFFSET and XMATCH functions together to match a value in...

How to Calculate Maximum Drawdown in Excel and Google Sheets

You can use the following dynamic array formula to calculate maximum drawdown (MDD) in...

Running Count with Structured References in Google Sheets

Running a count with structured references is achievable in Google Sheets tables using the...

More like this

How to Use OFFSET and XMATCH Functions Together in Excel

We often use the OFFSET and XMATCH functions together to match a value in...

Excel Tutorial: Calculate Nights Between Dates in Each Month

When working with date ranges in Excel, you might need to calculate how many...

How to Create a Case-Sensitive Pivot Table in Excel

As you may know, Pivot Tables in Excel are case-insensitive by default. To create...

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.