Raw data imported from ERPs, CRM platforms, and web portals often arrives messy, unformatted, and padded with invisible spaces. Excel’s core text manipulation functions allow you to clean, parse, and extract meaningful sub-strings with surgical accuracy.
1. String Extraction: LEFT, RIGHT, and MID
These three functions extract character sequences from specific positions within a text string:
1Function Syntaxes:
2=LEFT(text, [num_chars]) -> Extracts N characters starting from the far LEFT.
3=RIGHT(text, [num_chars]) -> Extracts N characters starting from the far RIGHT.
4=MID(text, start_num, num_chars) -> Extracts N characters starting from ANY position.
Practical Examples:
Product Code: 'INV-98234-US'
'=LEFT(A2, 3)' -> Returns 'INV' (The invoice prefix)
'=RIGHT(A2, 2)' -> Returns 'US' (The country code)
'=MID(A2, 5, 5)' -> Returns '98234' (Starts at character 5, extracts 5 characters)
Click to Zoom
Essential Excel Functions Overview
2. Text Hygiene: TRIM, CLEAN, and LEN
A. TRIM: Eliminating Hazardous Invisible Spaces
When VLOOKUP fails with '#N/A' on records that look identical, trailing or double spaces are almost always to blame.
'=TRIM(text)' strips all leading spaces, trailing spaces, and collapses multiple consecutive spaces into a single space.