How to use LEFT in Excel
LEFT returns the first characters of a text — country codes, prefixes, initials.
Syntax
=LEFT(text, [num_chars])
text | The text or cell. |
[num_chars] | How many characters to take (1 if omitted). |
Examples
=LEFT(A2, 2)"BG-1024-SOF" → "BG".=LEFT(B2, 1)&"."Initial: "Maria" → "M.".=LEFT(A2, FIND("-", A2)-1)Everything before the first hyphen.Take the first part of a code
Account numbers, IBANs and product codes often carry meaning in their first characters: a country, a branch, a product type. LEFT cuts them off so you can sort, filter or count by them.
=LEFT(A2, 2)The country code from an IBAN like BG80BNBG96611020345678: BG.=LEFT(A2, 3)A branch prefix like 104 from account 10457.Everything before a dash, space or @
When the first part has a different length in every row, find the separator with FIND and take one character less.
=LEFT(A2, FIND(" ", A2)-1)The first name from "Anna Petrova".=LEFT(A2, FIND("@", A2)-1)The user name from an email address.=IFERROR(LEFT(A2, FIND("-", A2)-1), A2)The part before the dash, or the whole text when there is no dash.Turn the result into a number
LEFT always returns text, even when it cuts out digits, so "104" won't match the number 104 in a lookup and SUM skips it. Add -- or VALUE in front.
=--LEFT(A2, 3)The first three digits as a real number.=VALUE(LEFT(A2, 4))The same with VALUE, easier to read.Common mistakes
- Result is text
LEFT(2025,2)returns "20" as text. Wrap in VALUE or add*1to make it a number.- Variable length
- When the part you need isn't always the same length, combine LEFT with FIND.
Frequently asked questions
How do I remove the first characters instead?
Use RIGHT with the length minus the characters to drop: =RIGHT(A2, LEN(A2)-3) removes the first three.
Why does LEFT return #VALUE!?
The number of characters is negative, usually because FIND didn't find the separator and returned an error. Wrap the formula in IFERROR, as in the example above.
Does LEFT work on numbers?
Yes, it treats the number as text, so =LEFT(10457, 3) gives the text "104". With dates it works on the hidden serial number, so use TEXT first: =LEFT(TEXT(B2, "yyyy-mm-dd"), 4).
Can Excel split text without formulas?
Yes: Data → Text to Columns, or Flash Fill (type the first result by hand and press Ctrl+E). Formulas are better when the data changes every month.
Available in: All versions of Excel, Excel for the web, Google Sheets