Text

LEFT Formula

LEFT extracts a specified number of characters from the beginning (left side) of a text string. It is commonly used to pull out area codes from phone numbers, extract prefixes from product codes, or isolate the first few characters of any identifier. It pairs well with FIND or SEARCH for dynamic extraction.

Syntax

LEFT(text, [num_chars])
ParameterDescription
text Parameter of the LEFT function.
[num_chars] (Optional.) Parameter of the LEFT function.
Try LEFT in Viztab — free, no signup

Examples

Extract area code from phone number

Formula
=LEFT(A2, 3)
Returns: "212" — the first 3 characters from "212-555-1234"

Get first name from full name

Formula
=LEFT(A2, FIND(" ", A2)-1)
Returns: "John" — extracts everything before the first space in "John Smith"

Extract year from date string

Formula
=LEFT(A2, 4)
Returns: "2024" — first 4 characters from "2024-03-15"

Common Errors

#VALUE!

The num_chars argument is negative. It must be zero or a positive number.

#VALUE!

The cell contains a date or number, not text. Wrap it with TEXT() first to convert: =LEFT(TEXT(A1,"0"), 3).

Tips

Dynamic length with FIND

Extract text before a delimiter: =LEFT(A1, FIND("-", A1)-1) gets everything before the first hyphen.

Omit num_chars for 1

=LEFT(A1) returns just the first character, same as =LEFT(A1, 1).

Combine with LEN

To get everything except the last N characters: =LEFT(A1, LEN(A1)-N).

Try LEFT in Viztab

Import your data and use LEFT with 370+ other formulas. No signup required.

Open Viztab

Related Formulas