LEFT, RIGHT, and MID extract portions of text from a cell. They're the core tools for splitting, cleaning, and reshaping text data — essential whenever you need part of a value rather than the whole thing.
LEFT: characters from the start
=LEFT(text, num_characters)
Returns the specified number of characters from the beginning.
Example — get the first 3 characters of a product code in A1:
=LEFT(A1, 3)
If A1 contains "ABC-1234", this returns "ABC".
RIGHT: characters from the end
=RIGHT(text, num_characters)
Returns characters from the end.
Example — get the last 4 characters:
=RIGHT(A1, 4)
From "ABC-1234", this returns "1234".
MID: characters from the middle
=MID(text, start_position, num_characters)
Returns characters starting at a given position.
Example — extract 4 characters starting at position 5:
=MID(A1, 5, 4)
From "ABC-1234", starting at character 5, this returns "1234".
The power move: combining with FIND
Hardcoding positions is fragile — it only works if every value has the same structure. The real power comes from combining these with FIND (or SEARCH), which locates a character's position dynamically.
Extract everything before a delimiter. Get the part of an email before the @:
=LEFT(A1, FIND("@", A1) - 1)
FIND locates the @, and LEFT grabs everything before it. The -1 excludes the @ itself.
Extract everything after a delimiter. Get the domain after the @:
=MID(A1, FIND("@", A1) + 1, LEN(A1))
This starts one character past the @ and grabs the rest (LEN gives the total length as a safe upper bound).
Split first and last names at the space:
=LEFT(A1, FIND(" ", A1) - 1)
gets the first name;
=MID(A1, FIND(" ", A1) + 1, LEN(A1))
gets the last name.
Helper functions worth knowing
- LEN(text) — returns the length of the text, useful as a safe "grab everything remaining" length in MID.
- FIND(find_text, within_text) — case-sensitive position of a character.
- SEARCH — like FIND but case-insensitive and supports wildcards.
- TRIM(text) — removes extra spaces, often needed to clean extracted text.
The modern alternative
In Excel 365, TEXTBEFORE and TEXTAFTER do the split-at-delimiter job directly, without nesting FIND:
=TEXTBEFORE(A1, "@")
=TEXTAFTER(A1, "@")
If you have them, they're far cleaner. But LEFT/RIGHT/MID with FIND work in every version and remain essential knowledge.
The takeaway
LEFT, RIGHT, and MID extract text by position. On their own they're simple; combined with FIND to locate delimiters dynamically, they handle almost any text-splitting task — emails, codes, names, and more. They're the foundation of text cleanup in Excel.