How to remove special characters from text in Excel
Excel formula
=TRIM(LET(c,MID(A2,SEQUENCE(LEN(A2)),1),CONCAT(IF(ISNUMBER(FIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 ")),c,""))))In Excel 365, keep only letters, digits and spaces: =TRIM(LET(c,MID(A2,SEQUENCE(LEN(A2)),1),CONCAT(IF(ISNUMBER(FIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 ")),c,"")))).
- Result on the example
- one result per row in
B2, filled down toB6 - Works in
- Microsoft 365 only
- Google Sheets
- Different formula, see below
See it work
The formula is already in B2, filled down to B6. Change any input and the result updates, or edit the formula to experiment.
How it works
LET names c, the text split into single characters. FIND looks for each one, lowercased, in a list of allowed characters; anything not found is replaced with "", and CONCAT joins the rest. TRIM removes the double spaces left where a symbol stood between two spaces.
In Google Sheets, the pattern [^A-Za-z0-9 ] means "any character that isn't a letter, digit or space".
=TRIM(LET(c,MID(A2,SEQUENCE(LEN(A2)),1),CONCAT(IF(ISNUMBER(FIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 ")),c,""))))Result"Desk lamp 12 black"
c{22 rows × 1 col} "D", "e", "s", "k", …A name defined in LET, or a named range.
A2"Desk lamp #12 – black!"The value in A2.
LEN(A2)22LEN: Number of characters.- text
A2"Desk lamp #12 – black!"
- text
SEQUENCE(LEN(A2)){22 rows × 1 col} 1, 2, 3, 4, …SEQUENCE: A grid of sequential numbers. Spills.- rows
LEN(A2)22
- rows
MID(A2,SEQUENCE(LEN(A2)),1){22 rows × 1 col} "D", "e", "s", "k", …MID: Characters from the middle of text.- text
A2"Desk lamp #12 – black!" - start_num
SEQUENCE(LEN(A2)){22 rows × 1 col} 1, 2, 3, 4, … - num_chars
1
- text
LOWER(c){22 rows × 1 col} "d", "e", "s", "k", …LOWER: Converts to lowercase.- text
c{22 rows × 1 col} "D", "e", "s", "k", …
- text
FIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 "){22 rows × 1 col} 4, 5, 19, 11, …FIND: Position of text, case-sensitive.- find_text
LOWER(c){22 rows × 1 col} "d", "e", "s", "k", … - within_text
"abcdefghijklmnopqrstuvwxyz0123456789 "
- find_text
ISNUMBER(FIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 ")){22 rows × 1 col} TRUE, TRUE, TRUE, TRUE, …ISNUMBER: TRUE if the value is a number.- value
FIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 "){22 rows × 1 col} 4, 5, 19, 11, …
- value
IF(ISNUMBER(FIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 ")),c,""){22 rows × 1 col} "D", "e", "s", "k", …IF: Returns one value if a test is true, another if false.- logical_test
ISNUMBER(FIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 ")){22 rows × 1 col} TRUE, TRUE, TRUE, TRUE, … - value_if_true
c{22 rows × 1 col} "D", "e", "s", "k", … - value_if_false
""
- logical_test
CONCAT(IF(ISNUMBER(FIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 ")),c,""))"Desk lamp 12 black"CONCAT: Joins text and ranges.- text1
IF(ISNUMBER(FIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 ")),c,""){22 rows × 1 col} "D", "e", "s", "k", …
- text1
LET(c,MID(A2,SEQUENCE(LEN(A2)),1),CONCAT(IF(ISNUMBER(FIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 ")),c,"")))"Desk lamp 12 black"LET: Names values inside a formula.- name1
c{22 rows × 1 col} "D", "e", "s", "k", … - value1
MID(A2,SEQUENCE(LEN(A2)),1){22 rows × 1 col} "D", "e", "s", "k", … - name2, value2
CONCAT(IF(ISNUMBER(FIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 ")),c,""))"Desk lamp 12 black"
- name1
TRIM(LET(c,MID(A2,SEQUENCE(LEN(A2)),1),CONCAT(IF(ISNUMBER(FIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 ")),c,""))))"Desk lamp 12 black"TRIM: Removes extra spaces, leaving single spaces between words.- text
LET(c,MID(A2,SEQUENCE(LEN(A2)),1),CONCAT(IF(ISNUMBER(FIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 ")),c,"")))"Desk lamp 12 black"
- text
In Google Sheets
Google Sheets needs a different formula: =TRIM(REGEXREPLACE(A2,"[^A-Za-z0-9 ]","")). On the same data it gives the same result. Here it is running in Google Sheets mode.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =TRIM(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2,"#",""),"–",""),"!",""),"(",""),")",""),"*",""),"%",""),":",""),"&",""),"'","")) | Desk lamp 12 black, Order rush, 50 off today only… | Works in every version, for a known set of symbols: one SUBSTITUTE per character. |
Common mistakes
- Accented letters aren't in the allowed list, so "Café" becomes "Caf". Add them to the list, or replace them first.
- FIND is used rather than SEARCH, because SEARCH treats ? and * as wildcards and would let them through.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Remove special characters from text
B2, remove every character that isn't a letter, a digit or a space, tidy the spaces, and fill down to B6.Questions
How do I keep some symbols, like dashes?
Add them to the allowed list: "abcdefghijklmnopqrstuvwxyz0123456789 -".
Is there a REGEXREPLACE in Excel?
Yes, in Microsoft 365: =TRIM(REGEXREPLACE(A2,"[^A-Za-z0-9 ]","")).
Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.