Spreadsheet Practice

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 to B6
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"

  1. c{22 rows × 1 col} "D", "e", "s", "k", …

    A name defined in LET, or a named range.

  2. A2"Desk lamp #12 – black!"

    The value in A2.

  3. LEN(A2)22

    LEN: Number of characters.

    • textA2"Desk lamp #12 – black!"
  4. SEQUENCE(LEN(A2)){22 rows × 1 col} 1, 2, 3, 4, …

    SEQUENCE: A grid of sequential numbers. Spills.

    • rowsLEN(A2)22
  5. MID(A2,SEQUENCE(LEN(A2)),1){22 rows × 1 col} "D", "e", "s", "k", …

    MID: Characters from the middle of text.

    • textA2"Desk lamp #12 – black!"
    • start_numSEQUENCE(LEN(A2)){22 rows × 1 col} 1, 2, 3, 4, …
    • num_chars1
  6. LOWER(c){22 rows × 1 col} "d", "e", "s", "k", …

    LOWER: Converts to lowercase.

    • textc{22 rows × 1 col} "D", "e", "s", "k", …
  7. FIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 "){22 rows × 1 col} 4, 5, 19, 11, …

    FIND: Position of text, case-sensitive.

    • find_textLOWER(c){22 rows × 1 col} "d", "e", "s", "k", …
    • within_text"abcdefghijklmnopqrstuvwxyz0123456789 "
  8. ISNUMBER(FIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 ")){22 rows × 1 col} TRUE, TRUE, TRUE, TRUE, …

    ISNUMBER: TRUE if the value is a number.

    • valueFIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 "){22 rows × 1 col} 4, 5, 19, 11, …
  9. 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_testISNUMBER(FIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 ")){22 rows × 1 col} TRUE, TRUE, TRUE, TRUE, …
    • value_if_truec{22 rows × 1 col} "D", "e", "s", "k", …
    • value_if_false""
  10. CONCAT(IF(ISNUMBER(FIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 ")),c,""))"Desk lamp 12 black"

    CONCAT: Joins text and ranges.

    • text1IF(ISNUMBER(FIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 ")),c,""){22 rows × 1 col} "D", "e", "s", "k", …
  11. 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.

    • name1c{22 rows × 1 col} "D", "e", "s", "k", …
    • value1MID(A2,SEQUENCE(LEN(A2)),1){22 rows × 1 col} "D", "e", "s", "k", …
    • name2, value2CONCAT(IF(ISNUMBER(FIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 ")),c,""))"Desk lamp 12 black"
  12. 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.

    • textLET(c,MID(A2,SEQUENCE(LEN(A2)),1),CONCAT(IF(ISNUMBER(FIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 ")),c,"")))"Desk lamp 12 black"

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.

FormulaResultWhen 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

In 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.