LEFT extracts a set number of characters from the start of a text value. Essential for splitting codes, pulling prefixes, and cleaning data.
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.
=LEFT(text, [num_chars])| Argument | Description |
|---|---|
| text required | The text string or cell reference to extract from. |
| num_chars optional | How many characters to extract. Defaults to 1 if omitted. |
=LEFT(A2, 2) ← "GB-12345" → "GB"=LEFT(A2, 1) ← "Mohammed" → "M"=LEFT(A2, 4) ← "2026-INV-001" → "2026"=IF(LEFT(A2, 3)="INV", "Invoice", "Other")=LEFT(A2, FIND(" ", A2) - 1)FIND locates the first space; LEFT extracts everything before it.
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"
ExcelPro has LEFT, RIGHT, MID and FIND exercises across all tracks. Free to start.
Try text exercises →