# How to remove special characters from text in Excel

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,"")))).

**Excel:** `=TRIM(LET(c,MID(A2,SEQUENCE(LEN(A2)),1),CONCAT(IF(ISNUMBER(FIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 ")),c,""))))` (Microsoft 365 only)

**Google Sheets:** `=TRIM(REGEXREPLACE(A2,"[^A-Za-z0-9 ]",""))`

## Example

Sample data (row 1 is the header):

| A | B |
| --- | --- |
| Raw | Clean |
| Desk lamp #12 – black! |  |
| Order (rush)* |  |
| 50% off: today only |  |
| Ana & Ben's shop |  |
| Plain text 123 |  |

Formula in B2, filled to B6: `=TRIM(LET(c,MID(A2,SEQUENCE(LEN(A2)),1),CONCAT(IF(ISNUMBER(FIND(LOWER(c),"abcdefghijklmnopqrstuvwxyz0123456789 ")),c,""))))`

Result: Desk lamp 12 black; Order rush; 50 off today only; Ana Bens shop; Plain text 123

## 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".

## Other ways

- `=TRIM(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2,"#",""),"–",""),"!",""),"(",""),")",""),"*",""),"%",""),":",""),"&",""),"'",""))`: 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.

## 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 ]",""))`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/remove-special-characters-from-text
