Excel function

LEFTfunction

Returns the given number of characters from the start (left) of a text.

All versions
=LEFT("Seattle, WA", 7)

Text11 chars

1S
2e
3a
4t
5t
6l
7e
8,
9·
10W
11A

Result7 chars

1S
2e
3a
4t
5t
6l
7e

Drag across the characters to change how many are taken. Try breaking it on purpose to see the errors.

Result

Seattle

text

The text to take characters from.

num_chars

How many characters to take. If omitted, 1.

What is the LEFT function?

=LEFT(text, [num_chars])

LEFT returns the first characters of a text: a prefix of a product code, the area code of a phone number, the city in "Seattle, WA".

Spaces and punctuation count as characters. If num_chars is larger than the text, LEFT returns the whole text.

Arguments

text
The text, or a cell containing it.
num_chars
How many characters to return. If omitted, LEFT returns 1 character.

LEFT examples

  1. Example 1. City from "Seattle, WA"

    =LEFT("Seattle, WA", 7)

    The result is Seattle.

  2. Example 2. Everything before a comma

    =LEFT(A2, FIND(",", A2)-1)

    FIND returns the position of the comma, so LEFT takes everything before it, whatever the length.

Common mistakes

FAQ

How do I take characters from the end?
Use RIGHT. For the middle, use MID.