0
0
Excelspreadsheet~5 mins

LEFT, RIGHT, MID extraction in Excel - Step-by-Step Guide

Choose your learning style9 modes available
Introduction
These functions help you pull out parts of text from a cell. LEFT gets characters from the start, RIGHT from the end, and MID from the middle. They are useful when you want to separate or analyze pieces of text like names, codes, or dates.
When you want to get the first few letters of a product code to identify its category.
When you need to extract the last four digits of a phone number for quick reference.
When you want to pull a specific part of a text string, like the middle three letters of a code.
When you have full names in one cell and want to get just the first name or last name.
When you want to separate date parts stored as text, like extracting the month from '20230415'.
Steps
Step 1: Click
- a blank cell where you want the extracted text
The cell is selected and ready for formula input
Step 2: Type
- the formula bar
Formula appears in the cell and formula bar
💡 Start with =LEFT(text, number_of_characters) to get characters from the start
Step 3: In the formula, replace 'text' with the cell reference containing your text, for example A2
- formula bar
Formula updates to =LEFT(A2, number_of_characters)
Step 4: Replace 'number_of_characters' with how many characters you want to extract, for example 3
- formula bar
Formula looks like =LEFT(A2, 3)
Step 5: Press Enter
- keyboard
Cell shows the first 3 characters from the text in A2
Step 6: Repeat steps 2 to 5 using =RIGHT(text, number_of_characters) to get characters from the end
- formula bar
Cell shows the last specified characters from the text
Step 7: Use =MID(text, start_position, number_of_characters) to get characters from the middle
- formula bar
Cell shows characters starting at the position you specify for the length you choose
Before vs After
Before
Cell A2 contains 'ExcelFun2024'
After
Using =LEFT(A2,5) shows 'Excel'; using =RIGHT(A2,4) shows '2024'; using =MID(A2,6,3) shows 'Fun'
Settings Reference
text
📍 formula argument
The text you want to extract characters from
Default: none
number_of_characters
📍 formula argument
How many characters to extract
Default: none
start_position
📍 MID formula argument
The position in the text where extraction begins
Default: none
Common Mistakes
Using a number_of_characters larger than the text length
Excel will just return the whole text, which might confuse you if you expect an error
Check the text length with LEN() before extracting or use a smaller number
For MID, starting position is zero or negative
MID requires start position to be 1 or more; zero or negative causes an error
Always use a start position of 1 or higher
Not using quotes around text strings in formulas
Excel treats unquoted text as cell references and will show errors if they don't exist
Put text strings inside double quotes, like =LEFT("Hello", 2)
Summary
LEFT, RIGHT, and MID extract parts of text from the start, end, or middle.
You specify the text, how many characters to extract, and for MID, where to start.
Make sure numbers are within the text length and text strings are quoted.