Excel CLEAN function
Removes the invisible characters (codes 0 to 31) that come along when copying from other systems. In Spanish Excel it is called LIMPIAR.
Syntax
English Excel
=CLEAN(text)
Spanish Excel (Mexico)
=LIMPIAR(texto)
Spanish Excel (Spain, Latin America)
=LIMPIAR(texto)
| Argument | What it is |
|---|---|
| text | The text to clean. |
Example
Data from another system carries invisible characters that TRIM does not remove; CLEAN deletes them. Amounts with dot thousands and comma decimals ("1.234,50") arrive as text: NUMBERVALUE(text, decimal, group) turns them into numbers whatever the regional settings.
=TRIM(CLEAN(A2))
Common mistake
It does not remove spaces: combine it with TRIM. It also leaves the web non-breaking space (code 160); use SUBSTITUTE(A2,CHAR(160),"").
About Ads
This site uses Google AdSense to display ads. These ads help us keep WebHerramientas completely free. Ads are managed by Google and meet strict security and privacy standards.
Ads help us keep WebHerramientas free for everyone
Practice CLEAN
Type the formula in the sheet and check it instantly. Spanish or English function names both work. See all lessons
Cleaning imported data: CLEAN and NUMBERVALUE
Data from another system carries invisible characters that TRIM does not remove; CLEAN deletes them. Amounts with dot thousands and comma decimals ("1.234,50") arrive as text: NUMBERVALUE(text, decimal, group) turns them into numbers whatever the regional settings.
In B2, clean each name: no invisible characters and no extra spaces.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Imported name | Clean name | Amount (text) | Amount | |
| 2 | Ana López | 1.234,50 | |||
| 3 | Luis Pérez | 980,00 | |||
| 4 | Marta Díaz | 12.500,75 | |||
| 5 | Jorge Ruiz | 3.040,10 | |||
| 6 | Sofía Castro | 15,90 | |||
| 7 |
Tip: while typing, click a cell or drag across several to insert their reference. F4 anchors the reference with $.
Frequently asked questions
- What is CLEAN called in Spanish?
- In Spanish Excel it is LIMPIAR. The formula =TRIM(CLEAN(A2)) is written =ESPACIOS(LIMPIAR(A2)) (or with commas in Mexico).
- Why does CLEAN use semicolons in some Excel versions?
- It depends on regional settings. Where the comma is the decimal mark (Spain, much of South America), Excel separates arguments with semicolons. English Excel and Mexican Spanish Excel use commas.
- What is the most common CLEAN mistake?
- It does not remove spaces: combine it with TRIM. It also leaves the web non-breaking space (code 160); use SUBSTITUTE(A2,CHAR(160),"").