Clean messy data with TRIM, PROPER and TEXTSPLIT
Extra spaces, SHOUTY names and “numbers” that won’t add up. Here are the text functions that fix imported data in seconds.
From messy to tidy
Fix spaces and capitals
TRIM removes leading and trailing spaces and squeezes double spaces to one. PROPER capitalises each word. Nest them and you fix both in one go.
Split one column into many
TEXTSPLIT breaks text at a delimiter and spills the parts into neighbouring cells. TEXTBEFORE and TEXTAFTER grab just one side.
| Formula | Input | Result |
|---|---|---|
| =TEXTAFTER(A2,"@") | asha@example.com | example.com |
| =TEXTBEFORE(A2,"@") | asha@example.com | asha |
| =LEFT(A2,3) | INV-2026-001 | INV |
| =TEXTAFTER(A2,"-",-1) | INV-2026-001 | 001 |
Numbers stored as text
Left-aligned numbers and a green triangle in the corner mean Excel sees text, so SUM ignores them. Strip the symbols, then convert with VALUE.
Try it in a live spreadsheet
Practise these formulas in interactive lessons with instant grading.
Lena Okafor
Data trainer at FluentExcel