The LEFT function in Excel
LEFT returns a set number of characters from the start of a text value. It's perfect for codes with a fixed structure, like the airport prefix in a booking reference or the region code at the front of a SKU. Combine it with FIND when the part you need varies in length, such as a first name.
Syntax
=LEFT(text, [num_chars])
| text | The text or cell to take characters from. |
|---|---|
| num_chars | Optional. How many characters to return, counting from the left. If left out, you get just the first character. |
Try it yourself
This is a live spreadsheet. Type the formula and press Enter.
Each booking reference starts with a 3-letter airport code. In C2, use LEFT to extract the origin airport from the reference in A2.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Origin | ||||||
| 2 | Ines Moreau | ||||||
| 3 | Darius Cole | ||||||
| 4 | Mei Tanaka | ||||||
| 5 | Pablo Ortiz | ||||||
| 6 | |||||||
| 7 | |||||||
| 8 |
Tip: Tell LEFT which cell to read and how many characters the airport code has.
Examples
=LEFT(A2,3)→ "NYC"Takes the first three characters of the product code: the city prefix.
=LEFT(B2)→ "G"With no character count, LEFT returns a single character. Great for initials.
=LEFT(B4,FIND(" ",B4)-1)→ "Katherine"FIND locates the space, and LEFT takes everything before it. This extracts a first name of any length.
Example data
| 1 | Product code | Customer |
|---|---|---|
| 2 | NYC-2291-B | Grace Hopper |
| 3 | LDN-0457-A | Alan Turing |
| 4 | SYD-1180-C | Katherine Johnson |
Common mistakes
The result is text, not a number
LEFT("2024-INV",4)returns the text "2024", which won't add up or match numbers in lookups. Wrap it in VALUE when you need a real number.Hardcoding a length for variable text
LEFT(B2,5)works for "Grace" but cuts "Katherine" short. Use FIND to locate a separator and calculate the length.Leading spaces shift everything
A cell that starts with a space returns the wrong characters. Clean it first:
LEFT(TRIM(A2),3).
FAQ
How do I extract the first word from a cell?+
Find the first space and take everything before it: =LEFT(A2,FIND(" ",A2)-1).
How do I remove the last few characters?+
Take the full length minus the characters to drop: =LEFT(A2,LEN(A2)-3) removes the last three.
What's the difference between LEFT, RIGHT and MID?+
LEFT reads from the start, RIGHT from the end, and MID from any position you choose in the middle.
Lesson
Master LEFT step by step: LEFT, RIGHT, MID and LEN
Split product codes and IDs into their parts by taking characters from the start, end or middle of the text.