Remove First Two Characters In Excel Instantly

Intro

Instantly remove first two characters in Excel with these easy methods. Learn how to use formulas, text functions, and shortcuts to delete unwanted characters. Discover how to use LEFT, RIGHT, and MID functions to extract desired text and improve data analysis. Simplify your data cleaning process with these expert tips.

Removing the first two characters from a cell or a range of cells in Excel can be a simple task if you know the right formulas or techniques to use. This is often necessary when cleaning or preprocessing data, especially when dealing with text strings that contain unwanted prefixes. Here's how you can remove the first two characters in Excel instantly.

Removing first two characters in Excel

Using the RIGHT Function

One of the most straightforward methods to remove the first two characters from a text string in Excel is by using the RIGHT function in combination with the LEN function. The RIGHT function returns the specified number of characters from the end of a text string, while LEN returns the total number of characters in a string.

Here's how you can do it:

  1. Formula: =RIGHT(A1, LEN(A1)-2)

    • A1 is the cell containing the text from which you want to remove the first two characters.
    • LEN(A1) calculates the length of the text in cell A1.
    • LEN(A1)-2 subtracts 2 from the total length, effectively telling Excel to return all characters except the first two.
    • RIGHT(A1, LEN(A1)-2) then returns the specified number of characters from the end of the text string, effectively removing the first two characters.
  2. Enter this formula in the cell where you want the result to appear. You can then copy this formula down for all cells that need this adjustment.

Using the MID Function

Another method is to use the MID function, which returns a specified number of characters from a text string, starting from a specified position.

Here's how:

  1. Formula: =MID(A1, 3, LEN(A1)-2)

    • A1 is the cell with the original text.
    • 3 specifies that you want to start extracting characters from the third position (thus skipping the first two characters).
    • LEN(A1)-2 specifies how many characters you want to extract, which is the total length minus the first two characters.
  2. Enter this formula in the cell where you want the result to appear.

Using Power Query (Excel 2010 and Later)

If you're working with a large dataset and want to remove the first two characters from a column of text strings, Power Query (known as "Get & Transform Data" in Excel 2016 and later) can be a powerful tool.

  1. Select the column you want to modify.

  2. Go to the "Data" tab > "From Table/Range" > "Get Data".

  3. In the Power Query Editor, select the column and then go to the "Add Column" tab.

  4. Click on "Add Custom Column" and enter the formula: = Text.AfterDelimiter([YourColumnName], 2)

    • Replace [YourColumnName] with the actual name of your column.
  5. Rename the new column as needed.

  6. Click "Close & Load" to apply the changes back to your Excel sheet.

Using VBA Macro

For repeated use or when dealing with multiple scenarios, you might prefer to create a custom function using VBA.

  1. Open the Visual Basic Editor (VBE) by pressing Alt+F11 or navigating to Developer > Visual Basic.

  2. In the VBE, insert a new module by right-clicking any of the objects for your workbook listed in the "Project" window > Insert > Module.

  3. Paste the following code into the module:

    Function RemoveFirstTwoChars(text As String) As String
        If Len(text) > 2 Then
            RemoveFirstTwoChars = Mid(text, 3)
        Else
            RemoveFirstTwoChars = ""
        End If
    End Function
    
  4. Save the module.

  5. You can now use this function in your Excel formulas like any other function: =RemoveFirstTwoChars(A1)

Regardless of the method you choose, Excel provides powerful tools to manipulate text strings according to your needs. Whether it's for data cleansing, data transformation, or preparing data for further analysis, removing unwanted characters is a common requirement that can be efficiently met with the right techniques.

Jonny Richards

Love Minecraft, my world is there. At VALPO, you can save as a template and then reuse that template wherever you want.