What it does
LEFT, RIGHT and MID extract characters from the start, end or middle of text.
Syntax or pattern
=LEFT(text, num_chars) / =RIGHT(text, num_chars) / =MID(text, start_num, num_chars)5 practical examples
Get first three characters
Extract a code prefix.
=LEFT(A2,3)Useful when product codes start with a category.
Get last four characters
Extract the last four digits of an ID.
=RIGHT(A2,4)Common for masked IDs.
Get characters from the middle
Extract a segment from a fixed code.
=MID(A2,4,3)Use when text has a predictable layout.
Combine with FIND
Extract text before a dash.
=LEFT(A2,FIND("-",A2)-1)FIND makes the formula more flexible.
Clean code pieces
Build a short label from parts of a text string.
=LEFT(A2,2)&"-"&RIGHT(A2,4)Concatenation creates readable labels.
Common mistakes to avoid
- Not handling missing delimiters.
- Forgetting that some text functions return text, not numbers.
- Using fixed positions when the text layout is not consistent.
Related Excel examples
FAQ
Can text formulas work with Excel Tables?
Yes. Table references can make text-cleaning formulas easier to understand.
Here are some ideas for you
Optional resources that may help if you are learning formulas, building reports, or working in spreadsheets often.
- Excel formula booksSee ideas
Practice formulas with structured examples you can keep beside your desk.
- Excel shortcut guidesSee ideas
Build speed with keyboard shortcuts for selection, formatting and navigation.
- Numeric keypadsSee ideas
Helpful if you enter many numbers on a laptop or compact keyboard.
- External monitorsSee ideas
Useful for viewing large worksheets, formulas and reference tables side by side.
- Desk notebooksSee ideas
Sketch formula logic, report ideas and table structures before building.
- Laptop standsSee ideas
Make long spreadsheet sessions more comfortable and ergonomic.
Some links in this section may be affiliate links. Choose only what is useful for your own work.