Formula Guide

The Excel LEFT Function
explained simply

LEFT extracts a set number of characters from the start of a text value. Essential for splitting codes, pulling prefixes, and cleaning data.

ExcelPro · 6 min read · Updated June 2026
Contents
  1. What does LEFT do?
  2. Syntax
  3. 5 real examples
  4. LEFT with FIND — dynamic extraction
  5. FAQ

What does LEFT do?

LEFT extracts a specified number of characters from the beginning (left side) of a text string. Use it to pull product codes, country prefixes, the first word of a name, or any fixed-length identifier that starts a longer string.

Syntax

=LEFT(text, [num_chars])
ArgumentDescription
text requiredThe text string or cell reference to extract from.
num_chars optionalHow many characters to extract. Defaults to 1 if omitted.

5 real examples

Example 1
Extract a country code
=LEFT(A2, 2) ← "GB-12345" → "GB"
Example 2
Get first initial
=LEFT(A2, 1) ← "Mohammed" → "M"
Example 3
Extract year from a code
=LEFT(A2, 4) ← "2026-INV-001" → "2026"
Example 4
Check if a code starts with a prefix
=IF(LEFT(A2, 3)="INV", "Invoice", "Other")
Example 5
Extract first word from a sentence
=LEFT(A2, FIND(" ", A2) - 1)

FIND locates the first space; LEFT extracts everything before it.

LEFT with FIND — dynamic extraction

When the number of characters varies, combine LEFT with FIND to locate a separator and extract everything before it.

Extract everything before the hyphen: =LEFT(A2, FIND("-", A2) - 1) "GB-London-2026" → "GB"

FAQ

What if num_chars is larger than the string length?
LEFT returns the entire string without error. =LEFT("Hello",100) returns "Hello".
Is LEFT case sensitive?
LEFT simply extracts characters — it does not change capitalisation. Wrap with UPPER, LOWER or PROPER if you need to standardise case.
Can LEFT extract from a number?
Yes, but it converts the number to text first. =LEFT(12345,2) returns "12" as text. Wrap with VALUE to convert back to a number.
How do I extract text from the END of a string?
Use RIGHT instead: =RIGHT(A2, 3) extracts the last 3 characters.

Practise text extraction formulas

ExcelPro has LEFT, RIGHT, MID and FIND exercises across all tracks. Free to start.

Try text exercises →

Related formulas

RIGHT MID FIND LEN TRIM SUBSTITUTE