To remove text from the left side of a cell in Excel, use the RIGHT and LEN functions together: =RIGHT(A1, LEN(A1) - n), where n is the number of characters to remove. For example, =RIGHT(A1, LEN(A1) - 5) removes the first 5 characters. This is the fastest and most direct method, and it works in all modern versions of Excel.
Why You Might Need to Remove Left Text
Data imported from other systems often arrives with unwanted prefixes. Common examples include:
- Product codes like “ID-12345” where you only need “12345”.
- Phone numbers with a country code prefix, e.g., “+1-555-1234”.
- Names with titles, e.g., “Dr. Jane Smith” where you want “Jane Smith”.
- Dates stored as text, e.g., “2023-01-15” where you only need the year.
Removing the left portion is a common data-cleaning step before analysis, sorting, or merging with other datasets.
The Core Formula: RIGHT and LEN
The most reliable approach uses two functions:
RIGHT(text, num_chars)returns the specified number of characters from the end (right side) of a text string.LEN(text)returns the total number of characters in the text.
To remove the first n characters, you ask RIGHT to return the total length minus n characters. The formula is:
=RIGHT(A1, LEN(A1) - n)
Example: Suppose cell A1 contains “ID-12345”. To remove the first 3 characters (“ID-“), use:
=RIGHT(A1, LEN(A1) - 3)
This returns “12345”. The formula works because LEN(A1) is 8, and 8 minus 3 equals 5, so RIGHT extracts the last 5 characters.
If the number of characters to remove is not constant (e.g., you want to remove everything up to the first hyphen), you can combine with FIND to locate the hyphen dynamically:
=RIGHT(A1, LEN(A1) - FIND("-", A1))
This removes everything through the first hyphen. For “ID-12345”, FIND returns 3, so it removes 3 characters, giving “12345”.
Using Flash Fill for Quick Removal
Excel’s Flash Fill (introduced in Excel 2013) can remove left text without formulas. Here’s how:
- In the column next to your data, type the desired result for the first cell manually (e.g., type “12345” next to “ID-12345”).
- Press Ctrl + E (Windows) or Cmd + E (Mac) to trigger Flash Fill. Excel will detect the pattern and fill the rest of the column.
- Alternatively, go to Data > Flash Fill in the ribbon.
Flash Fill is great for one-off tasks, but it’s not dynamic—if your source data changes, the results won’t update automatically. For dynamic results, stick with formulas.
Removing a Fixed Number of Characters with REPLACE
Another formula-based method uses REPLACE, which replaces part of a text string with something else. To remove the first n characters, replace them with an empty string:
=REPLACE(A1, 1, n, "")
For example, =REPLACE(A1, 1, 3, "") removes the first 3 characters from A1. This is often more intuitive than RIGHT/LEN because it directly states “start at position 1, remove n characters.” Both formulas return the same result.
Dealing with Variable Prefix Lengths
If the prefix length varies, you need a way to find where the useful text begins. Common patterns:
- Remove up to a specific delimiter: Use
FINDorSEARCH(case-insensitive). For example, to remove everything up to and including the first space:=RIGHT(A1, LEN(A1) - FIND(" ", A1)). - Remove a known suffix after the prefix: If you want to remove everything before the last hyphen, use
FINDwith the optional start number:=RIGHT(A1, LEN(A1) - FIND("-", A1, FIND("-", A1)+1)). - Remove a fixed number of characters after a delimiter: Combine
MIDwithFIND:=MID(A1, FIND("-", A1)+1, LEN(A1))extracts everything after the first hyphen.
For example, with “ABC-123-XYZ”, to remove everything up to the second hyphen:
=RIGHT(A1, LEN(A1) - FIND("-", A1, FIND("-", A1)+1))
This returns “XYZ”.
Common Errors and Pitfalls
When using these formulas, watch out for:
- #VALUE! error: Occurs if
nis greater than the total string length. For example,=RIGHT(A1, LEN(A1)-10)when A1 has only 5 characters. Always ensurenis less than or equal toLEN(A1). - Spaces and non-printing characters: Imported data may contain leading spaces or line breaks. Use
TRIMandCLEANto remove them first:=RIGHT(TRIM(CLEAN(A1)), LEN(TRIM(CLEAN(A1)))-n). - Numbers stored as text: If the result looks like a number but is text, multiply by 1 or use
VALUEto convert:=VALUE(RIGHT(A1, LEN(A1)-n)). - Case sensitivity:
FINDis case-sensitive;SEARCHis not. Choose accordingly.
Alternatives: Text to Columns and Power Query
For non-formula approaches, consider:
- Text to Columns: Select the column, go to Data > Text to Columns, choose “Delimited” or “Fixed width”, and split the data. You can then delete the unwanted left columns. This is static—changes to the original won’t update.
- Power Query: For repeatable transformations, load your data into Power Query (Data > From Table/Range), use the “Extract” feature (e.g., “Text After Delimiter”), and load back. This is dynamic if you refresh the query.
These are better for one-time cleanups or when you need to handle large datasets without writing formulas.
Frequently Asked Questions
How do I remove the first 3 characters from every cell in a column?
In a new column, enter =RIGHT(A1, LEN(A1)-3) (assuming your data starts in A1) and drag the fill handle down. This will remove the first 3 characters from each cell. If you want to replace the original data, copy the results and use Paste Special > Values.
Can I remove left text without a formula?
Yes. Use Flash Fill (Ctrl+E) as described above, or use Text to Columns. Both are formula-free, but they are static—if your source data changes, you’ll need to repeat the process.
What if I want to remove everything before a specific word, not just a fixed number of characters?
Use FIND to locate the word. For example, to remove everything before the word “Total” in A1: =RIGHT(A1, LEN(A1) - FIND("Total", A1) + 1). The +1 keeps the word itself; remove it if you want to drop the word too.
Why does my formula return #VALUE!?
This usually means the number of characters to remove is larger than the string length. For instance, =RIGHT(A1, LEN(A1)-10) on a 5-character string gives a negative number, which Excel can’t handle. Check your n value and ensure it’s less than or equal to LEN(A1).
Does this work in Google Sheets?
Yes, the RIGHT, LEN, REPLACE, and FIND functions work identically in Google Sheets. The formulas and examples above are fully compatible.
Can I remove left text from numbers without converting to text?
If the number is stored as a number, you can’t directly use text functions. Convert it to text first with TEXT(A1, "0"), then apply RIGHT and LEN. For example, to remove the first digit from 12345: =VALUE(RIGHT(TEXT(A1,"0"), LEN(TEXT(A1,"0"))-1)) returns 2345 as a number.
Related
- Generate Random Number in Oracle SQL?
- Button Cell Battery Components: What’s Inside
- Next Tab Shortcut: Windows, Mac & Browser Keys
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Excel Time Formulas for Calculating Hours WorkedTo calculate hours worked in Excel, subtract the start time from the end time and multiply by 24;…
- Excel Sort by Rank: Formulas & StepsThe quickest way to sort by rank in Excel is to first assign ranks with the RANK.EQ function…
- How to Combine Names in Excel With a Formula EasilyTo combine first, middle, and last names in Excel, put them in separate columns and enter =TRIM(A2&" "&B2&"…
- Clear a Filter in an Excel Table: Steps and OptionsTo clear a filter in an Excel table, open the drop-down arrow in the filtered column’s header and…
- Excel Formula Bot Free? Free Plans, Limits, and Safe UseYes—many Excel formula bots offer free access, but it is usually limited by usage, features, or account requirements.…
- Excel Shortcut for Clearing a Filter in a WorksheetIn Excel for Microsoft 365 on Windows, press Alt, then A, then C to clear the active filter…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.