Remove Characters from the Start, End, or Anywhere
Every cell carries junk you need gone — a 2-character prefix on order IDs, a trailing country code, or dashes scattered through SKUs.
Excel & Google Sheets
This formula works in both Excel and Google Sheets.
How it works
Three tools cover the three cases. To drop the first N characters, start MID at position N+1 and take a huge length — =MID(A2,3,999) skips 2 characters and 999 simply means "the rest of the text." To drop the last N characters, keep everything except them: =LEFT(A2,LEN(A2)-2) measures the full length and keeps all but the final 2. To delete a specific character wherever it appears, replace it with nothing: =SUBSTITUTE(A2,"-",""). These are safe on every row because they work from positions and lengths, not from what the characters actually are.
When to use it
Use it to strip system prefixes off order numbers, drop "-US" style suffixes before matching lists, or clean dashes and spaces out of phone numbers and SKUs before a lookup.
Common mistakes
Did this formula help?
Engine-verified against the sample data aboveDownload the proof sheet (.xlsx)Last reviewed 2026-07-09