Skip to content
Astera Technology

Clean report-label spacing in a separate Calc column

Prepare a readable label while keeping the original cell intact.

Download complete case notes and answer keys ↓

Work with the example

Why does one label keep a gap after TRIM? Open the Calc workbook and compare the source in A with the two prepared columns. A6 contains a nonbreaking space U+00A0 between North and desk; A5 uses ordinary spaces. These are display labels, not customer identities.

Supplied exercise data
SourceTRIM onlyPrepared C
Two leading/trailing spaces; three insideNorth deskNorth desk
North + U+00A0 + deskU+00A0 remainsNorth desk

Edit the working cells

B5 uses =TRIM(A5). C5 uses =TRIM(SUBSTITUTE(A5;UNICHAR(160);" ")). Fill both down. Change A5 to " South desk ": C5 becomes South desk. Three ordinary spaces alone produce empty text. D uses EXACT to show whether the original and prepared strings are identical; both baseline rows areFALSE.

Check the failure case

TRIM alone leaves the stated U+00A0 character. This formula does not promise to remove every Unicode space, zero-width character or identity difference. Keep A unchanged so the proposed label can be reviewed.

If A5 contains only spaces, does empty C5 establish that a required label was supplied?

Show the worked answer

No. The display cleanup returns empty text; required-field rules need their own check.

Example files

Related resources