Back to functions
Text2026-03-183 related articles

LEFT Function in Excel

Return the first character or characters from a text string.

Syntax

LEFT(text, [num_chars])

Arguments

text

Required

The text string that contains the characters you want to extract.

num_chars

Optional

Specifies the number of characters you want LEFT to extract. Num_chars must be greater than or equal to zero.

What it returns

Returns the leftmost characters from the supplied text value.

What LEFT does

LEFT extracts characters from the beginning of a text string. It is useful for pulling prefixes, area codes, year fragments, or fixed-width identifiers from imported data.

Practical examples

Extract a fixed prefix from a code

=LEFT(A2,4)

If A2 contains INV-2048, the result is INV-.

Return the first character only

=LEFT(A3)

When num_chars is omitted, LEFT returns one character from the start of the text.

Common mistakes and notes

LEFT counts spaces as characters

If the text begins with a space, that space is included in the result. Clean imported values with TRIM when needed.

num_chars must be zero or greater

A negative value causes an error. Use positive numbers to specify how many characters to return.

Numbers are treated as text when necessary

LEFT can work on numbers, but it extracts visible digits as text. That matters if the result will be used in later arithmetic.

Related functions

Related articles

Deep dives, troubleshooting guides, and practical examples that use LEFT.

Official documentation