Text Tools: Flash Fill, TEXTSPLIT and Cleaning Data
Data copied from websites or other systems is often messy. Excel has quick tools to fix it.
Data from other systems is rarely clean: extra spaces, names in capitals, codes stuck together, duplicates. Cleaning it by hand is slow and error-prone. Excel's text tools - Flash Fill, splitting and joining functions, TRIM and Remove Duplicates - let you clean thousands of rows in seconds, which is a skill employers value highly.
Flash Fill (Ctrl + E)
Type one or two examples of what you want next to your data, then press Ctrl + E. Excel spots the pattern and fills the rest.
Example
A B (you type the first one, then Ctrl + E)
asha.verma@example.in Asha Verma
ravi.kumar@example.in Ravi Kumar ← filled by Excel
neha.singh@example.in Neha Singh ← filled by ExcelSplitting and joining text
Example
=TEXTSPLIT("Delhi,Mumbai,Pune", ",") → Delhi | Mumbai | Pune (spills across)
=TEXTBEFORE("asha@example.in", "@") → asha
=TEXTAFTER("asha@example.in", "@") → example.in
=TEXTJOIN(", ", TRUE, A2:A6) → all names in one cell, skipping blanks
=LEFT(A2, 3) =RIGHT(A2, 4) =MID(A2, 2, 5)Older versions: use Data → Text to Columns to split by a comma or space.
Cleaning
Example
=TRIM(A2) removes extra spaces
=CLEAN(A2) removes hidden line breaks and odd characters
=PROPER("RAVI kumar") → Ravi Kumar
=UPPER(A2) =LOWER(A2)
=SUBSTITUTE(A2, "-", "") removes every dash: "98-76-54" → "987654"
=VALUE("1,499") → 1499 as a real number- Data → Remove Duplicates deletes repeated rows (keep a copy first!).
- Ctrl + H (Find & Replace) changes text everywhere at once.
- Numbers stored as text show a small green triangle; select them and choose Convert to Number.
After cleaning with formulas, copy the results and use Paste Special → Values to keep just the clean text.
Key points
- Flash Fill (Ctrl + E) copies a pattern from your examples.
- TEXTSPLIT, TEXTBEFORE/AFTER and TEXTJOIN split and join text.
- TRIM, CLEAN and Remove Duplicates tidy data; paste as values when done.
📝 Test yourself
1. Which shortcut runs Flash Fill?
2. What does =TRIM(" Pune ") return?
3. Fill in the function that joins a range with commas:
=(", ", TRUE, A2:A6)
