LEFT function
Returns a set number of characters from the start of a text string, e.g. the first 3 letters of a product code.
Available in All versions of Excel, including Microsoft 365, Excel for Mac and Excel for the web
In every Excel versionWorks in Google Sheets
Syntax
LEFT(text, [num_chars])| Argument | What it means | |
|---|---|---|
text | Required | The text or cell to take characters from. |
num_chars | Optional | How many characters to return. Default 1. If larger than the text length, the whole text is returned. |
Returns: Text: the first num_chars characters.
How LEFT works
LEFT cuts a piece off the beginning of a text. If your product codes start with a 3-letter warehouse code (NYC-1042, LON-0391), =LEFT(A2,3) pulls out the warehouse. With no second argument it returns just the first character, which is handy for initials or for reading a Y/N answer.
When the part you need has a variable length, combine LEFT with FIND or SEARCH: find the position of the delimiter (a space, hyphen or @) and take everything before it. =LEFT(A2,FIND(" ",A2)-1) returns the first word of a name. In Microsoft 365, TEXTBEFORE does the same in one step.
LEFT always returns text, even from a number: =LEFT(2026,2) gives the text "20". Wrap it in VALUE (or add +0) if you need to calculate with the result. LEFT also works on the stored value, not the display, so a date in a cell returns the first digits of its serial number.
Examples
1Warehouse code from a product code
| A | B | |
|---|---|---|
| 1 | Product code | Warehouse |
| 2 | NYC-1042 | NYC |
| 3 | LON-0391 |
Result: NYC
The first three characters of NYC-1042 are returned.
2First name from a full name
| A | B | |
|---|---|---|
| 1 | Full name | |
| 2 | Maria Lopez | Maria |
Result: Maria
FIND locates the space at position 6, so LEFT takes the 5 characters before it.
3Year as a real number
| A | B | |
|---|---|---|
| 1 | Invoice ID | |
| 2 | 2026-INV-77 | 2026 |
Result: 2026
LEFT returns the text "2026"; VALUE converts it to the number 2026 so it can be compared with other years or used in DATE.
4Default of one character
| A | B | |
|---|---|---|
| 1 | Answer | |
| 2 | Yes | Y |
| 3 | No |
Result: Y
Without num_chars LEFT returns one character, a quick way to turn survey answers into Y/N codes.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#VALUE! | num_chars is negative. | Make sure the length calculation cannot go below zero; e.g. when FIND fails or returns 1, FIND(...)-1 may be 0 or an error. |
#VALUE! | The FIND inside the formula did not find its delimiter. | Wrap in IFERROR, e.g. =IFERROR(LEFT(A2,FIND(" ",A2)-1),A2) to return the whole name when there is no space. |
Tips
- Leading spaces count as characters. Clean the source with TRIM first if the data comes from an import.
- LEFT on a number formatted with leading zeros (like
00742) sees only the stored value742. UseLEFT(TEXT(A2,"00000"),2)to work with the displayed digits. - In Microsoft 365 LEFT accepts a range and spills:
=LEFT(A2:A100,3)fills a whole column in one formula.
Questions
How do I get everything before a certain character?
Use =LEFT(A2,FIND("-",A2)-1), replacing "-" with your delimiter, or =TEXTBEFORE(A2,"-") in Microsoft 365.
How do I remove the first few characters instead of keeping them?
Keep the rest with RIGHT: =RIGHT(A2,LEN(A2)-3) drops the first 3 characters. REPLACE works too: =REPLACE(A2,1,3,"").
Why does LEFT return a number that does not add up?
LEFT always returns text. Convert it with VALUE or --LEFT(...) before using it in sums or comparisons with numbers.
Google Sheets
LEFT also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
LEFT in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Czech | ZLEVA |
| Danish | VENSTRE |
| Dutch | LINKS |
| Finnish | VASEN |
| French | GAUCHE |
| German | LINKS |
| Hungarian | BAL |
| Italian | SINISTRA |
| Norwegian (Bokmål) | VENSTRE |
| Polish | LEWY |
| Portuguese (Brazil) | ESQUERDA |
| Portuguese (Portugal) | ESQUERDA |
| Russian | ЛЕВСИМВ |
| Spanish | IZQUIERDA |
| Swedish | VÄNSTER |
| Turkish | SOLDAN |
Recipes that use LEFT
- How to capitalize the first letter in Excel
- How to combine first and last name in Excel
- How to convert text to a date in Excel
- How to split first and last name in Excel