Practice / Data Cleaning

Clean extra spaces from imported names (TRIM)

Easy Data Cleaning

A CRM export landed in your inbox, and every customer name carries stray spaces — leading, trailing, even doubles in the middle. Your mail merge will bounce on all of them. Fill the Cleaned name cells C2:C5 so each name from A2:A5 is trimmed to a single normal form.

Your solution should use cell references so it updates automatically when Test Case input values change.

Hints 0/4
Solutions 2
–
Test case
1
2
3
Reset
Submit
fx
A
B
C
D
E
F
G
1
2
3
4
5
6
7
8
9
10
Loading interactive spreadsheet...
Preparing grid cells and formula calculation engine
○ Ready Enter formula in highlighted cells, then click Submit.

Notes

TRIM removes leading and trailing spaces and collapses internal runs of spaces to a single space. It does not remove non-breaking spaces (CHAR(160)) from web data — SUBSTITUTE handles those.

FAQ

How do I remove extra spaces in Excel?

Use =TRIM(A2). It deletes leading and trailing spaces and reduces any run of inner spaces to a single space.

Why do some spaces survive TRIM?

TRIM only handles the standard space character. Non-breaking spaces (CHAR(160)) from web pages survive it — wrap the text in SUBSTITUTE(text, CHAR(160), " ") first.

Can I TRIM a whole column at once?

Write =TRIM(A2) in C2, then fill down (or double-click the fill handle) so every row gets a cleaned copy next to it.