ID EN
#Text

LEFT

Excel Functions

Extract text from the left of a string

Syntax

EXCEL
=LEFT(text, [num_chars])

Arguments

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.

Return Value

One or more characters.

Details

The LEFT function extracts a given number of characters from the left side of a supplied text string. The first argument, text, is the text string to extract from. This is typically a reference to a cell that contains text. The second argument, called num_chars, specifies the number of characters to extract. If num_chars is not provided, it defaults to 1. If num_chars is greater than the number of characters available, LEFT returns the entire text string. Although LEFT is a simple function, it shows up in many more advanced formulas that test or manipulate text in a specific way. 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 characters with LEFT: If the optional argument num_chars is not

Examples

LEFT function basics

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

EXCEL
=LEFT("apple",1) // returns "a"
=LEFT("apple",2) // returns "ap"
=LEFT("apple",3) // returns "app"
LEFT function basics

If the optional argument num_chars is not provided, it defaults to 1:

EXCEL
=LEFT("ABC") // returns "A"
LEFT function basics

If num_chars exceeds the length of the text string, LEFT returns the entire string:

EXCEL
=LEFT("apple",100) // returns "apple"
LEFT function basics

When LEFT is used on a numeric value, the result is text:

EXCEL
=LEFT(1000,3) // returns "100" as text
Example - abbreviate month names

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:

EXCEL
=LEFT("January",3) // returns "Jan"
Example - abbreviate month names

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

EXCEL
=LEFT(B5,3)

See Also

RIGHT MID LEN TEXTBEFORE TEXTAFTER TEXTSPLIT