Zoho Sheet CLEAN Function: Syntax, Examples and Troubleshooting
Remove ASCII nonprinting control characters from imported text strings.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
=CLEAN("Ready"&CHAR(10)&"Now") has the expected result ReadyNow. The line-feed separator disappears; CLEAN does not insert a replacement space. Zoho documents the first 32 nonprinting ASCII codes, rather than a universal Unicode or security-cleaning operation.
Availability and version history
- Introduced: The original introduction release and date are not established by the checked official sources.
- Availability: Documented in Zoho Sheet’s current rolling web-service help; no final supported-version endpoint is established.
- Scope: English-language web documentation. Historical releases, mobile and offline-client parity remain separately unverified.
- Checked: October 14, 2026, against the official CLEAN entry. Explicit text examples were independently calculated; no native Zoho Sheet execution was performed.
Syntax and the documented control range
CLEAN(text)
The official reference takes one required text argument and identifies ASCII codes 0–31 as the removal set. Its bell-character example joins Zoho and Sheet into ZohoSheet. An HTML-rendered line break in another example does not identify an exact stored control code.
For reproducible inputs, CHAR accepts codes 1–255. Therefore the demonstrations generate codes 7, 9, 10 and 13; they do not try to generate code 0 with CHAR. The documented CLEAN range and CHAR’s permitted inputs are separate contracts.
Enter the original eight customer and tag pairs
Create CustomerPairs, reserving A1:M12. Put the four field names in A1:D1 and enter all eight original records in A2:D9. These are fictitious text values, not a connected customer list. No separate download is required.
| Row | A: Raw_Customer | B: Canonical_Customer | C: Raw_Tag | D: Canonical_Tag |
|---|---|---|---|---|
| 2 | eAST DEPOT | East Depot | ca-0041 | CA-0041 |
| 3 | WEST market | West Market | us-0087 | US-0087 |
| 4 | north HUB | North Hub | ca-0102 | CA-0102 |
| 5 | south SHOP | South Shop | gb-1042 | GB-1042 |
| 6 | CENTRAL store | Central Store | ca-0205 | CA-0205 |
| 7 | harbor depot | Harbor Depot | gb-0111 | GB-0111 |
| 8 | east depot | East Depot | ca-0420 | CA-0420 |
| 9 | North Hub | North Hub | ca-0001 | CA-0001 |
Keep the tag columns as text and do not enter quotation marks around any value. Preserve the original letter case, digits and hyphens; later transformations belong in result columns.
Keep the original literal examples and comparison
The printed customer table contains no control characters. It supplies the original comparison target D2, but the following formulas construct their own controls:
| Cell | Formula | Expected text |
|---|---|---|
| F2 | =CLEAN("Ready"&CHAR(10)&"Now") |
ReadyNow |
| F3 | =CLEAN("Zoho"&CHAR(7)&"Sheet") |
ZohoSheet |
| F4 | =CLEAN("A"&CHAR(9)&"B") |
AB |
| F5 | =CLEAN("East Depot") |
East Depot |
| G2 | =IF(EXACT(CLEAN("CA"&CHAR(10)&"-0041");D2);"MATCH";"REVIEW") |
MATCH |
G2 removes the inserted line feed, leaving CA-0041 for the EXACT comparison. This is a demonstration of a chosen transformation, not proof that every malformed tag should be repaired this way.
In I2 enter =CLEAN(A2), J2 =EXACT(I2;A2) and K2 =LEN(A2)-LEN(I2). Fill I2:K2 through row 9. All I values remain the original raw customer names, all J values are TRUE and all K values are 0. CLEAN does not change their capitalization; use the separately documented UPPER or LOWER only when that is intended.
Show both the hidden input and its measured change
Create ControlAudit, reserving A1:F9. Put Source, Cleaned, Raw length, Cleaned length, Removed and Unchanged in A1:F1. Enter these formulas in A2:A7:
| Row | A formula |
|---|---|
| 2 | ="Ready"&CHAR(10)&"Now" |
| 3 | ="Zoho"&CHAR(7)&"Sheet" |
| 4 | ="A"&CHAR(9)&"B" |
| 5 | ="East Depot" |
| 6 | ="CA"&CHAR(10)&"-0041" |
| 7 | =" " |
Enter B2 =CLEAN(A2), C2 =LEN(A2), D2 =LEN(B2), E2 =C2-D2 and F2 =EXACT(A2;B2). Fill B2:F2 through row 7.
| Row | B | C | D | E | F |
|---|---|---|---|---|---|
| 2 | ReadyNow | 9 | 8 | 1 | FALSE |
| 3 | ZohoSheet | 10 | 9 | 1 | FALSE |
| 4 | AB | 3 | 2 | 1 | FALSE |
| 5 | East Depot | 10 | 10 | 0 | TRUE |
| 6 | CA-0041 | 8 | 7 | 1 | FALSE |
| 7 | three ordinary spaces | 3 | 3 | 0 | TRUE |
LEN includes the controls in the original count. Zero removed characters does not mean the value is complete or correct; row 7 is still spaces. TRIM answers a separate ordinary-space question.
Advanced: preserve a separator before removing controls
Create SeparatorPolicy, reserving A1:F8. Put Original, Clean only, Replace tab first, Raw length, Clean length and Replaced length in A1:F1. Enter ="A"&CHAR(9)&"B" in A2, ="A B" in A3, ="AB" in A4 and ="A"&CHAR(13)&CHAR(10)&"B" in A5.
Enter B2 =CLEAN(A2), C2 =CLEAN(SUBSTITUTE(A2;CHAR(9);" ")), D2 =LEN(A2), E2 =LEN(B2) and F2 =LEN(C2). Fill B2:F2 through row 5.
| Row | B | C | D | E | F |
|---|---|---|---|---|---|
| 2 | AB | A B | 3 | 2 | 3 |
| 3 | A B | A B | 3 | 3 | 3 |
| 4 | AB | AB | 2 | 2 | 2 |
| 5 | AB | AB | 4 | 2 | 2 |
SUBSTITUTE replaces all matching occurrences when its final argument is omitted. This formula targets tabs only. The carriage-return/line-feed pair in row 5 is subsequently removed by CLEAN without inserting a space.
B7 =EXACT(B2;B4) is TRUE, C7 =EXACT(C2;C3) is TRUE and D7 =EXACT(A2;A4) is FALSE. Different originals can collapse to one result under either policy. Decide which separators carry meaning before deduplicating transformed records.
The checked CLEAN entry does not guarantee outcomes for code 127, nonbreaking spaces, zero-width characters or every Unicode control. Retain raw imports and establish a separate rule for such characters rather than assuming that invisible means removable.
Errors, imports and text boundaries
Use straight quotation marks around formula literals and Zoho’s documented semicolon separator in multi-argument formulas. The one-argument function itself needs no separator. A copied formula must still point to the intended source row.
The entry’s shared error table includes generic name, reference and argument-type messages. It does not establish an exact result for every blank, numeric, date, array or error input. These exercises use explicit ASCII strings; Unicode normalization, emoji counting, unusual whitespace and cross-client import behavior remain separately unverified. Isolate a mismatch with the direct literal example before changing the underlying records.