Excel text functions turn messy text into clean, usable data. Names come in one cell, codes come in another, and sometimes you need to pull one part out of a long string. That is where Excel text functions save the day. LEFT, RIGHT, MID, LEN, FIND, and CONCATENATE (or its newer cousin TEXTJOIN) are the toolkit you need to clean up text and turn it into usable data.
In this guide, I will walk through each function, explain what it does, and show real examples that come up in everyday Excel work.

LEFT — Pull Characters from the Start
LEFT returns the first few characters of a text string. The syntax is:
=LEFT(text, [num_chars])Example:
=LEFT("ExcelFormula", 5)Returns “Excel”.
The num_chars argument is optional. If you leave it out, LEFT returns 1 character. If you specify a number greater than the text length, LEFT returns the whole string.
Real example: You have employee codes in A2 that always start with a 3-letter department code. You want to extract that code.
=LEFT(A2, 3)Copy down and you have a department column.
RIGHT — Pull Characters from the End
RIGHT returns the last few characters of a text string. The syntax is:
=RIGHT(text, [num_chars])Example:
=RIGHT("Order-10452", 5)Returns “10452”.
Real example: You have invoice numbers in A2 where the last 4 digits are the year. You want the year.
=RIGHT(A2, 4)This is common when data comes from systems that append codes to the end of strings.
MID — Pull Characters from the Middle
MID returns characters from the middle of a string, starting at a position you specify. The syntax is:
=MID(text, start_num, num_chars)Example:
=MID("Excel-2026-Report", 7, 4)Returns “2026”. It starts at position 7 and takes 4 characters.
Real example: You have product codes like “PRD-1024-IND” and you want to extract the middle number.
=MID(A2, 5, 4)This starts at position 5 and takes 4 characters. That gives you “1024”.
MID is powerful when the pattern is consistent. When positions change, you need FIND or LEN to help.
LEN — Count the Characters
LEN returns the number of characters in a string. The syntax is:
=LEN(text)Example:
=LEN("Hello World")Returns 11. Spaces count as characters.
LEN is usually combined with LEFT, RIGHT, or MID to make them dynamic. For example, if you want everything except the last 3 characters:
=LEFT(A2, LEN(A2) - 3)This is much better than hard-coding character counts, because it adapts to different string lengths.
FIND — Locate a Character
FIND returns the position of one text inside another. The syntax is:
=FIND(find_text, within_text, [start_num])Example:
=FIND("-", "PRD-1024-IND")Returns 4, because the first hyphen is at position 4.
FIND is case-sensitive. If you need case-insensitive search, use SEARCH instead. Both are useful, but SEARCH is friendlier for general text.
Real example: You want to extract everything before the first hyphen in a product code.
=LEFT(A2, FIND("-", A2) - 1)This works even when the code length changes.
CONCATENATE — Join Text Together
CONCATENATE joins two or more text strings into one. The syntax is:
=CONCATENATE(text1, [text2], ...)Example:
=CONCATENATE(A2, " ", B2)If A2 is “Rahul” and B2 is “Sharma”, this returns “Rahul Sharma”.
In modern Excel, the & operator is often cleaner:
=A2 & " " & B2Both work. The & operator is short and reads naturally. CONCATENATE is still useful in older files, but new formulas usually use &.
For joining many cells, TEXTJOIN is better:
=TEXTJOIN(", ", TRUE, A2:A10)This joins all values in A2:A10 with a comma and space, skipping blanks. It is much faster than typing CONCATENATE with ten arguments.
Real Example: Cleaning Names
You have full names in column A like “Sharma, Rahul”. You want to split them into first and last name.
First name (everything after the comma and space):
=MID(A2, FIND(", ", A2) + 2, LEN(A2))Last name (everything before the comma):
=LEFT(A2, FIND(",", A2) - 1)Two formulas, two clean columns. This is how you turn “Sharma, Rahul” into “Rahul” and “Sharma” without manual editing.
Real Example: Extracting Domain from Email
You have emails in A2 like “rahul@company.com”. You want just the domain.
=MID(A2, FIND("@", A2) + 1, LEN(A2))This starts after the @ and goes to the end.
To get just the username (before the @):
=LEFT(A2, FIND("@", A2) - 1)Simple, reusable, and works for any email length.
Real Example: Standardizing Phone Numbers
You have phone numbers in different formats: “+91-98765-43210”, “9876543210”, “(91) 98765 43210”. You want just the last 10 digits.
This is harder than it looks, because the punctuation changes. One approach is to first remove all non-digits using SUBSTITUTE, or use the newer TEXTAFTER/TEXTBEFORE functions in modern Excel. In older versions, you may need a combination of MID, LEN, and FIND, or a helper column.
A simpler approach: if the last 10 characters of every string are the number, use =RIGHT(A2, 10). This works only if the format is consistent, which is why cleaning data matters.
Test Yourself With This Exercise
Type a small contact list in A1:C11 with the headers Full Name, Email, and Code, where Code looks like ORD-2026-0142 and names are in First Last format. In D2, split the first name with =LEFT(A2, FIND(” “, A2)-1), and in E2 get the last name with =MID(A2, FIND(” “, A2)+1, LEN(A2)). In F2, pull the year from the code with =MID(C2, 5, 4), and in G2 pull the number at the end with =RIGHT(C2, 4). Wrap the year in VALUE so it becomes a real number you can calculate with: =VALUE(MID(C2, 5, 4)).
Now clean a messy copy. Paste the same names with extra spaces into column H, and in I2 use =TRIM(H2) to remove them. Compare the lengths with =LEN(H2) and =LEN(I2) to see the difference. Finally, join the first and last name back together with =D2 & ” ” & E2 and check it matches the original. If a formula returns an error, check that FIND actually found a space, and remember that LEFT, RIGHT, and MID always return text, so use VALUE when you need a number.
Modern Alternatives Worth Knowing
If you are on Microsoft 365 or Excel 2021, these functions make text work much easier:
- TEXTBEFORE: Get everything before a delimiter
=TEXTBEFORE(A2, "-")- TEXTAFTER: Get everything after a delimiter
=TEXTAFTER(A2, "-")- TEXTSPLIT: Split a string into multiple cells at once
=TEXTSPLIT(A2, "-")- TEXTJOIN: Join multiple values with a delimiter, skipping blanks
=TEXTJOIN(", ", TRUE, A2:A10)These save time, but LEFT, RIGHT, MID, LEN, and FIND still matter in older files and complex cases.
Practical Example: Building a Report Header
You have department code in A2, month in B2, and year in C2. You want a header like “SALES — March 2026”.
=A2 & " — " & B2 & " " & C2That is a clean, readable formula. No CONCATENATE needed.
Or with TEXTJOIN:
=TEXTJOIN(" ", TRUE, A2, B2, C2)Both work. Pick the one that reads best for the report.
Frequently Asked Questions
What is the difference between FIND and SEARCH?
FIND is case-sensitive. SEARCH is not. Use SEARCH when you do not know the exact case of the text.
How do I extract text between two characters?
Combine MID and FIND. For example, to pull the text between two hyphens:
=MID(A2, FIND("-", A2) + 1, FIND("-", A2, FIND("-", A2) + 1) - FIND("-", A2) - 1)It looks long, but once you understand the pattern, it is straightforward.
Can I split a full name into first and last name?
Yes. Use LEFT, RIGHT, MID, and FIND. Or in modern Excel, use TEXTSPLIT with a space delimiter.
Why does my text formula return #VALUE?
The most common causes are using a number as a start position when text is required, or the FIND function not locating the search text. Check the delimiters and trim extra spaces.
Should I clean text before using LEFT, RIGHT or MID?
Yes. Clean it first with TRIM and CLEAN. A hidden space shifts every position, so a formula that works on one row can fail on the next.
Does TEXTSPLIT work in older versions of Excel?
No. TEXTSPLIT is one of the newer Excel text functions, available in Microsoft 365 and Excel 2021. In older versions, use Data > Text to Columns for a one-off, or LEFT, RIGHT, MID and FIND for a formula-based split.
Clean Text with TRIM, CLEAN and SUBSTITUTE
Before you use LEFT, RIGHT or MID on imported data, clean the text first. Extra spaces and invisible characters usually make an Excel text functions formula return the wrong piece of a string. TRIM removes leading, trailing and double spaces: =TRIM(A2). CLEAN removes non-printable characters that arrive with copied data: =CLEAN(A2). SUBSTITUTE replaces one piece of text with another, for example removing hyphens: =SUBSTITUTE(A2, “-“, “”). Combine them for a clean starting point: =TRIM(CLEAN(A2)).
TEXTSPLIT in Detail
TEXTSPLIT splits one string into several cells in a single step, which makes it one of the most useful Excel text functions in Microsoft 365. The syntax is: =TEXTSPLIT(text, col_delimiter, [row_delimiter]). Example: =TEXTSPLIT(A2, “, “) splits “Sharma, Rahul, Sales” into three cells across a row. To split down a column, leave the column delimiter blank and use a row delimiter: =TEXTSPLIT(A2, , CHAR(10)) splits text separated by line breaks into rows.
Related guide: INDEX MATCH Explained: Why It Beats VLOOKUP
Related guide: COUNTIF vs COUNTIFS: The Complete Guide
Final Thoughts
Text functions are the difference between clean data and chaotic data. LEFT, RIGHT, and MID pull out what you need. LEN and FIND make those formulas flexible. CONCATENATE, TEXTJOIN, and the & operator put text back together. Learn these six functions and you will spend far less time manually editing cells, and far more time on real analysis.









