Excel function · Finding text
LEFT
Returns the first characters of a text.
What it does
LEFT takes a number of characters from the start of a text. It suits codes whose first part means something, such as a country or a department prefix.
Syntax
=LEFT(text, [num_chars])Arguments in square brackets are optional, and … means you can add more of the same. In this Excel language, arguments are separated by ,
Arguments
- text
- The text to take characters from.
- num_chars
- How many characters to take. Leave it out to take just one.
Example
Each order code starts with a two-letter country. Which country is DE-4471?
| A | B | |
|---|---|---|
| 1 | Code | Country |
| 2 | DE-4471 | DE |
The formula in B2:
=LEFT(A2,2)Result: DE
The first two characters of DE-4471 are D and E, so the result is DE.
Common mistakes
- Using a fixed count when the first part varies in length. Find where it ends with
FINDinstead. - Expecting a number back. The result is text, even when it looks like digits.
In other Excel languages
Excel translates function names, and in some languages the argument separator too. Type the name your Excel shows.
| Excel language | Function name | Separator |
|---|---|---|
| English | LEFT | , |
| Deutsch | LINKS | ; |
| Français | GAUCHE | ; |
| Español (España) | IZQUIERDA | ; |
| Español (México) | IZQUIERDA | , |
| 日本語 | LEFT | , |
| 한국어 | LEFT | , |
| 繁體中文 | LEFT | , |
| ไทย | LEFT | , |
| ខ្មែរ | LEFT | , |
| Tiếng Việt | LEFT | ; |