Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Excel Formula to Remove Text from Left: Guide & Examples

· 7 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To remove text from the left side of a cell in Excel, the most efficient method is using the REPLACE function or a combination of RIGHT and LEN. For example, to remove the first 5 characters of a cell (A1), use =REPLACE(A1, 1, 5, ""). This tells Excel to start at the first character, take the next five characters, and replace them with nothing, effectively deleting them from the string.

What You'll Need

  • A computer with Microsoft Excel installed (works in all modern versions including Office 365, Excel 2021, 2019, and 2016).
  • A dataset containing the text strings you wish to modify.
  • Basic familiarity with how to enter a formula into a cell.

Step-by-Step

Depending on whether you want to remove a specific number of characters or remove everything before a specific symbol (like a dash or a space), the method changes. Here are the detailed steps for both scenarios.

Method 1: Removing a Fixed Number of Characters

Use this method when every cell in your column has the same number of characters that need to be deleted from the start (e.g., removing a standard prefix like "ID- ").

  1. Select your target cell: Click on the empty cell where you want the cleaned text to appear. This should typically be in a new column next to your original data to avoid overwriting it.
  2. Enter the REPLACE formula: Type =REPLACE(A1, 1, X, ""). Replace A1 with the cell reference containing your text, and replace X with the number of characters you want to remove. For example, if you want to remove the first 3 characters, the formula is =REPLACE(A1, 1, 3, "").
  3. Execute the formula: Press Enter. Excel will now display the text starting from the character immediately following the number you specified.
  4. Apply to the entire column: Hover your mouse over the bottom-right corner of the cell (the fill handle) until the cursor becomes a small black cross. Click and drag downward to apply the formula to all rows in your dataset.
  5. Convert formulas to values: Since the result is currently a formula, it will break if you delete the original column. To fix this, select the new cells, copy them (Ctrl + C), right-click on the same area, and select Paste Special > Values. You can now safely delete the original column.

Method 2: Removing Text Before a Specific Character

Use this method when the amount of text to be removed varies from cell to cell, but there is a consistent delimiter (like a comma, colon, or space) that marks where the removal should stop.

  1. Identify the delimiter: Determine which character marks the end of the text you want to remove. For example, if your data is "Order# 12345", the delimiter is the space.
  2. Use the RIGHT and FIND combination: Enter the following formula: =RIGHT(A1, LEN(A1) - FIND(" ", A1)). In this example, " " represents the space character.
  3. Understand the logic: The FIND function locates the position of the space. The LEN function calculates the total length of the string. By subtracting the position of the space from the total length, Excel determines exactly how many characters are to the right of that space and returns only those characters.
  4. Adjust for the delimiter: If your delimiter is a dash, change " " to "-". If it is a colon, use ":".
  5. Fill and Finalize: Drag the fill handle down to apply the formula to the rest of your list and then use Paste Special > Values to lock in the results.

Method 3: Using Flash Fill (The Non-Formula Way)

If you have a large dataset and don't want to write formulas, Excel's Flash Fill can often detect the pattern and do the work for you.

  1. Provide an example: In the empty column next to your data, manually type the desired result for the first row. For example, if A1 is "REF-9988", type "9988" in B1.
  2. Provide a second example: In B2, type the desired result for the second row. This helps Excel understand the pattern is "remove everything before the dash."
  3. Trigger Flash Fill: Press Ctrl + E on your keyboard. Excel will analyze the pattern and instantly fill the rest of the column.
  4. Verify the data: Quickly scan the results to ensure Excel didn't misinterpret a cell that had a different structure.

Common Mistakes

  • Forgetting the Quotes: In formulas like REPLACE or FIND, any text or delimiter you search for must be enclosed in double quotation marks (e.g., " "). If you omit these, Excel will return a #NAME? error because it thinks you are referring to a named range.
  • Off-by-One Errors: When using the RIGHT and LEN method, users often forget that FIND returns the position of the delimiter itself. If you want to remove the delimiter as well, the subtraction logic is correct. However, if you want to keep the delimiter, you must adjust the math by adding or subtracting 1.
  • Overwriting Source Data: Entering a formula into the same cell as the original text will cause a circular reference error. Always use a helper column.
  • Ignoring Leading/Trailing Spaces: Sometimes text looks like it has 5 characters to remove, but there is a hidden leading space. This causes the REPLACE function to remove the wrong characters. Use the TRIM function first if your data is messy.

Tips

  • Dynamic Arrays: If you are using Office 365, you can use the TEXTAFTER function, which is significantly simpler. The formula =TEXTAFTER(A1, "-") automatically removes everything to the left of the dash, including the dash itself.
  • Combining with TRIM: To ensure your results are clean, wrap your formula in a TRIM function: =TRIM(REPLACE(A1, 1, 5, "")). This removes any accidental double spaces created during the process.
  • Case Sensitivity: Remember that FIND is case-sensitive. If you are looking for a specific letter to determine where to cut the text and the case varies, use SEARCH instead of FIND, as SEARCH ignores capitalization.
  • Using Tables: Convert your data range into an official Excel Table (Ctrl + T). This makes your formulas dynamic, meaning if you add new rows to the bottom, the "remove text from left" formula will automatically apply to the new entries.

Troubleshooting

If the formula does not go to plan, check these common failure points:

  • #VALUE! Error: This usually happens with the FIND function when the delimiter you are searching for does not exist in the cell. For example, if you search for a dash but the cell only contains letters, Excel returns this error. To fix this, wrap your formula in IFERROR: =IFERROR(RIGHT(A1, LEN(A1)-FIND("-", A1)), A1). This tells Excel to just return the original text if the delimiter isn't found.
  • Wrong Characters Removed: If you are removing 5 characters but it looks like 4 or 6, check for non-printing characters or hidden spaces. Use the =LEN(A1) formula in a separate cell to see the actual character count of your source data.
  • Formula Not Calculating: If you see the formula =REPLACE(...) written out in the cell instead of the result, your cell is likely formatted as "Text". Change the cell format to "General" via the Home tab, then click into the formula bar and press Enter.
  • Incorrect Result After Dragging: If the results look shifted, check your cell references. Ensure you are using relative references (A1) rather than absolute references ($A$1) unless you specifically intend to always reference one single cell.

Frequently Asked Questions

Can I remove text from the left based on a specific word?

Yes. You can use the SEARCH function to find the starting position of a specific word and then use REPLACE or RIGHT to remove everything before that word's end position.

Does this work for numbers?

Yes, but be aware that removing digits from the left of a number may convert that number into a text string. If you need the result to be a number for calculations, wrap the entire formula in the VALUE() function.

How do I remove the first 3 characters if some cells are shorter than 3?

If you use REPLACE(A1, 1, 3, "") on a cell with only 2 characters, Excel will simply return an empty string. To prevent this, use an IF statement to check the length first: =IF(LEN(A1)>3, REPLACE(A1, 1, 3, ""), A1).

Is there a way to do this without a formula?

Yes, you can use the "Text to Columns" feature under the Data tab. Select "Fixed Width" to manually set a break line at the number of characters you want to remove, then simply delete the first column created by the split.

What is the difference between REPLACE and SUBSTITUTE?

REPLACE is used when you know the exact position of the text you want to remove. SUBSTITUTE is used when you know the specific text string you want to remove, regardless of where it is located in the cell.