Why can spaces remain after Excel TRIM when text comes from a webpage?

A person compares printed text beside a laptop displaying a table and document.

Key points

  1. Visually similar whitespace may consist of different characters.
  2. TRIM retains single ordinary word spaces; it is not a universal Unicode cleaner.
  3. Establish character identity and field meaning before checking a copy.

Why can apparent spaces remain after TRIM?

They may not be the ordinary space TRIM handles. Microsoft’s TRIM guidance identifies ASCII value 32 as its target; the nonbreaking space commonly found in webpages has decimal value 160 and is not removed by TRIM alone.

Remaining whitespace does not establish that the character is 160. Retain a short original sample and its source, separating the observed symptom from character identity. Not every invisible difference is the same kind of space.

Does TRIM remove every space between words?

No. Its documented behaviour retains single ordinary spaces between words rather than erasing every separator.

Establish the field’s purpose first: names, addresses, product descriptions and identifiers may require different rules. Do not delete meaningful separators merely to make two text values appear identical.

Hands mark two text samples with a pencil beside a tablet.

Does adding CLEAN necessarily handle nonbreaking spaces?

No. CLEAN is designed for ASCII nonprinting characters 0–31, not value 160. Microsoft’s data-cleaning guidance separately discusses substitution for higher-value characters.

Identify the problematic character before choosing a targeted treatment. This article promises no universal formula for every Unicode whitespace character, nor that a general function combination has been validated for every file.

How can a check preserve the original data?

Use a small set of identified samples in an authorised test copy or helper column, retaining original and processed values side by side. Check whether the intended character changed and whether meaningful word separators were preserved.

If character identity is unverified, leave the result pending rather than replacing an entire sheet, overwriting source columns or deleting data. This article has run no Excel test and changed no workbook.

What should be recorded for a colleague?

Record the text source, affected field, identified character, expected retained format, test samples and actual observations. “Spaces cleaned” is insufficient without a defined scope.

The focus here is character differences, not a complete duplicate-customer deletion, numeric conversion or lookup-formula guide. Any subsequent treatment should be approved only after the original data, field meaning and checking results are clear.

Frequently asked questions

Does an ineffective TRIM result prove the character is 160?

No. It is a known limitation, but actual character identity still needs verification.

Can TRIM alone remove a nonbreaking space?

No. Official guidance distinguishes ordinary spaces from the nonbreaking character with value 160.

Will TRIM join two English words together?

Its ordinary-space behaviour retains a single separator, as documented. Do not separately remove every meaningful separator.

Is CLEAN a universal replacement for handling whitespace?

No. Its design scope is limited; it is not a general solution for nonbreaking spaces or every Unicode character.

Should the whole customer-data column be overwritten immediately?

No. Retain original values and use small authorised samples to establish field meaning and results first.

About the author: This article was written by the HKONE team. HKONE is a Hong Kong digital marketing and AI automation company providing social media management, website design, AI customer service and GEO / SEO for SMEs. Where this article mentions platform fees or policies, the platform's official information takes precedence.

Tell us about your business first. Then decide.

The consultation is free. We will understand your situation before recommending a plan and a quote.