TRIM and LEN
Clean stray spaces and measure text length
0 of 3 done · Lesson 16 of 18
Understand
A customer export contains leading spaces, trailing spaces and doubled spaces between words. TRIM cleans those gaps. LEN counts the characters that remain, including intentional spaces inside the text.
=TRIM(text to clean)
=LEN(text to measure)
A worked example
=LEN(B2)
text to clean
B2 is Kea Ltd , so this returns 13
The sheet you are working with
| Row number | A | B | C |
|---|---|---|---|
| 1 | Customer ID | Imported name | Status |
| 2 | CUS-1042 | Kea Ltd | Active |
| 3 | CUS-2075 | North Wind | Active |
| 4 | CUS-3184 | Rimu Co | Paused |
| 5 | CUS-4221 | Halcyon | Active |
| 6 | CUS-5360 | Pounamu Group | Paused |
| 7 | CUS-6408 | Brightsmith | Active |