# How to remove special characters from text in Google Sheets

Keep only letters, digits and spaces, then tidy the spaces: `=TRIM(REGEXREPLACE(A2,"[^A-Za-z0-9 ]",""))`.

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

**Excel:** Microsoft 365 has REGEXREPLACE with the same pattern. Older versions need one SUBSTITUTE per character you want to remove.

## Example

Sample data (row 1 is the header):

| A | B |
| --- | --- |
| Product name | Clean |
| Desk Lamp™ (LED)! |  |
| Office Chair – Mesh |  |
| Monitor Arm #2 |  |
| Webcam 1080p* |  |
| Mouse & Keyboard Set |  |

Formula in B2, filled to B6: `=TRIM(REGEXREPLACE(A2,"[^A-Za-z0-9 ]",""))`

Result: Desk Lamp LED; Office Chair Mesh; Monitor Arm 2; Webcam 1080p; Mouse Keyboard Set

## How it works

A `^` inside square brackets means "not": `[^A-Za-z0-9 ]` matches any character that isn't a plain letter, a digit or a space, and REGEXREPLACE deletes every one. Removing the dash in "Chair – Mesh" leaves two spaces in a row, so TRIM collapses them to one.

## Other ways

- `=REGEXREPLACE(A2,"[^A-Za-z0-9 ]","")`: Without TRIM, gaps are left where symbols sat between spaces. (Double spaces in "Office Chair  Mesh" and "Mouse  Keyboard Set".)
- `=TRIM(REGEXREPLACE(A2,"[^A-Za-z0-9 .\-]",""))`: Add characters to the list to keep them, here dots and hyphens. None of these names have any, so the result is the same.

## Common mistakes

- `A-Za-z` covers only unaccented letters, so "Café" loses its é. Use `\p{L}` for letters in any language: `"[^\p{L}0-9 ]"`.
- A hyphen inside square brackets means a range unless it is escaped or placed last.

## Questions

**How do I remove one specific character?**

Use SUBSTITUTE for a fixed character: `=SUBSTITUTE(A2,"#","")`.

**How do I remove emojis?**

The same pattern removes them, since they aren't letters or digits.

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
