Syntax
| Parameter | Description |
|---|---|
| text | Parameter of the CLEAN function. |
Examples
Clean imported data
=CLEAN(A1)
Clean and trim combined
=TRIM(CLEAN(A1))
Clean before matching
=VLOOKUP(CLEAN(A1), B:C, 2, FALSE)
Common Errors
Occurs if the argument is an error value rather than text. Wrap in IFERROR if the source cell might contain errors.
Tips
CLEAN only strips ASCII 0-31. Non-breaking spaces (char 160) and other Unicode whitespace survive. Use SUBSTITUTE(CLEAN(A1), CHAR(160), " ") for those.
Always pair CLEAN with TRIM: =TRIM(CLEAN(A1)). CLEAN removes control chars, TRIM removes extra spaces. Together they handle most import issues.
CLEAN strips line feeds (char 10) and carriage returns (char 13). If you want to keep line breaks but remove other junk, use SUBSTITUTE instead.
Try CLEAN in Viztab
Import your data and use CLEAN with 370+ other formulas. No signup required.
Open Viztab