Extract text from the left of a string
=LEFT(text, [num_chars])
| Parameter | Description |
|---|---|
text |
The text from which to extract characters. |
num_chars |
[optional] The number of characters to extract, starting on the left. Default = 1. |
To extract text with LEFT, just provide the text and the number of characters to extract. The formulas below show how to extract one, two, and three c
=LEFT("apple",1) // returns "a"
=LEFT("apple",2) // returns "ap"
=LEFT("apple",3) // returns "app"
If the optional argument num_chars is not provided, it defaults to 1:
=LEFT("ABC") // returns "A"
If num_chars exceeds the length of the text string, LEFT returns the entire string:
=LEFT("apple",100) // returns "apple"
When LEFT is used on a numeric value, the result is text:
=LEFT(1000,3) // returns "100" as text
The LEFT function can be used to abbreviate text values. For example, to extract the first three characters of "January" you can use LEFT like this:
=LEFT("January",3) // returns "Jan"
Of course, it doesn't make sense to abbreviate a text string that you have to type into a formula. A more typical example is to abbreviate text values
=LEFT(B5,3)