Text Functions
Clean, split, combine, and transform text data using Excel built-in text functions.
✅ What You Will Learn
Real-world data is rarely clean. Names have inconsistent capitalisation, product codes have extra spaces, dates are stored as text, and customer IDs need parts extracted. Text functions are what analysts use to clean and reshape this messy data before analysis.
Excel has over 25 text functions. The most useful ones fall into four categories: extraction (LEFT, MID, RIGHT), combination (CONCAT, TEXTJOIN), cleaning (TRIM, PROPER, UPPER, LOWER), and transformation (SUBSTITUTE, TEXT, VALUE). Mastering these eliminates hours of manual data cleanup.
In modern Excel (Microsoft 365), many text operations can also be done with TEXTSPLIT and TEXTBEFORE/TEXTAFTER — powerful additions for splitting strings without formulas.
📋 Raw customer data needing text cleanup
| Raw Name | Phone | Product Code | Date (text) | |
|---|---|---|---|---|
| rahul sharma | rahul@email.com | 9876543210 | PROD-2024-LPT-01 | 15-01-2026 |
| PRIYA VERMA | priya@email.com | 9988776655 | PROD-2024-MOB-07 | 22-02-2026 |
| amit kumar | amit@email.com | 9123456789 | PROD-2025-TAB-03 | 05-03-2026 |
Syntax
Examples
📌 Key Points to Remember
- ✓TRIM removes leading, trailing, and duplicate internal spaces — use it on every text column imported from external systems
- ✓PROPER capitalises the first letter of each word — good for names, but check for exceptions like "McDonald"
- ✓FIND is case-sensitive; SEARCH is not — use SEARCH when you do not know the case
- ✓TEXT(value, format) converts numbers to text for display: =TEXT(TODAY(),"DD-MMM-YYYY") → "20-Aug-2026"
- ✓VALUE(text) converts a text-stored number back to a real number so SUM and other math works on it
🏢 Real-World Application
Data exported from CRM systems, ERPs, and banking portals regularly has issues like names in all caps, product codes with inconsistent separators, and dates stored as text. Analysts at companies like Flipkart and Amazon India spend significant time cleaning data with these functions before dashboards can be built. A TRIM+PROPER cleanup pass on a 10,000-row file takes seconds with formulas.
⚠️ Common Mistakes to Avoid
❓ Frequently Asked Questions
How do I split a full name into first and last name columns?
Use =LEFT(A1,FIND(" ",A1)-1) for the first name and =MID(A1,FIND(" ",A1)+1,LEN(A1)) for the last name. In Excel 365, Flash Fill (Ctrl+E) often handles this automatically.
What is the difference between SUBSTITUTE and REPLACE?
SUBSTITUTE replaces a specific text string wherever it appears. REPLACE replaces characters at a specific position regardless of what they are. Use SUBSTITUTE for find-and-replace logic, REPLACE for positional manipulation.
How do I format a number as currency text?
=TEXT(A1,"₹#,##0") converts 52000 to "₹52,000". Note that the result is text — you cannot do arithmetic on it. Use TEXT only for display purposes.
✏️ Practice Exercise
You have a column of product codes in the format "CAT-YEAR-SKU" (e.g. "ELEC-2024-LPT01"). Write formulas to extract: (1) the category (before the first dash), (2) the year (between the two dashes), (3) the SKU (after the second dash). Then write a TEXTJOIN formula that rebuilds the code from those three parts with "/" as the separator instead.
Learn Excel with Live Trainer Guidance
These tutorials give you the foundations. Our live Excel course at EVIKA Academy, Noida teaches you to build real dashboards on actual business data — with a trainer who uses Excel professionally every day.