LEFT function
LEFT returns the first characters of a text string, such as a prefix or area code. Combine it with FIND to cut at a delimiter. The result is text, even for digits.
Example
Read it as a sentence: take the first 2 characters of Excel, which gives Ex.
A
B
C
D
1
Ex
2
3
Syntax
LEFT(text, [num_chars])
Arguments in [square brackets] are optional.
-
text(required) - The text to take characters from.
-
num_chars(optional) - How many characters to return; default 1.
Returns: The first characters of the text.
What Excel actually returns
Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.
| Formula | Excel shows | Case |
|---|---|---|
=LEFT("Excel",2) | Ex | Basic |
=LEFT("Excel") | E | Default 1 |
=LEFT("Excel",0) | Zero | |
=LEFT("Excel",10) | Excel | Longer than text |
=LEFT(12345,2) | 12 | Number |
=LEFT(TRUE,1) | T | Bool |
=LEFT(0.1+0.2,5) | 0.3 | Float text form |
=LEFT("Excel",-1) | #VALUE! | Negative |
Watch out for
- Result is text even for digits; use VALUE or -- to convert.
- Omitting num_chars returns just one character.
Where it works
- Excel
- LEFT is in every version of Excel from 2007 on.
- Google Sheets
- Same name, same behaviour for everyday use.
Part of Text functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .