What LEFT does
LEFT returns the first characters of a text, as many as you ask for. =LEFT(A2,2) takes the first two characters of the product code UK-4471-B and returns UK. When FIND works out the count, LEFT returns everything before a space or a dash, such as the first name in a full name.
It’s one of the tools for cleaning data that arrives in one piece but means several things, like codes with a country at the front or names exported as a single column. LEFT takes the start; RIGHT takes the end and MID the middle.
Whatever LEFT returns is text, even when it looks like a number.
Syntax
textRequired- The text to take characters from, usually a cell such as
A2. num_charsOptional- How many characters to take from the start. Leave it out and LEFT takes 1. It can be a calculation, such as the position of a space minus 1.
Example: the country from a product code
Every product code starts with a two-letter country. The formula in B2 is filled down to B5.
Example: a first name from a full name
The first name is everything before the space, and its length changes from row to row. FIND returns the position of the space, so one less than that is the length of the first name.
Text before a specific character
The first-name formula works with any separator. Put the character you’re looking for in place of the space, and LEFT returns everything in front of it:
- The country before the dash in UK-4471-B:
=LEFT(A2,FIND("-",A2)-1)returns UK. - The user name in an email address:
=LEFT(A2,FIND("@",A2)-1)returns ana.silva fromana.silva@example.com.
FIND stops at the first match, so in a text with two dashes you get the part before the first one. In Microsoft 365 and Excel 2024, TEXTBEFORE does the same in one step: =TEXTBEFORE(A2,"-").
Common mistakes
=LEFT("20261103",4)returns the text 2026, which won’t add up with SUM or compare with a number. Wrap it in VALUE to get a number:=VALUE(LEFT(A2,4)).- A fixed count works only when every code has the same layout. When the part you want varies in length, work the length out with FIND, as in the first-name example.
- ” UK-4471-B” with a space in front gives ” U”. Clean the text with TRIM first:
=LEFT(TRIM(A2),2). - When FIND can’t find a space, it returns
#VALUE!, and so does the formula. Catch single-word names with IFERROR. - A date is a number underneath, so
=LEFT(A2,4)on Mar 15, 2026 returns 4609, the start of its serial number. Use=YEAR(A2)for the year.
Frequently asked questions
How do I extract text before a character in Excel?
Find the character with FIND and take one character less: =LEFT(A2,FIND("-",A2)-1) returns UK from UK-4471-B. In Microsoft 365 and Excel 2024, =TEXTBEFORE(A2,"-") gives the same result.
How do I remove the first characters instead of keeping them?
Use RIGHT with LEN: =RIGHT(A2,LEN(A2)-3) drops the first three characters and keeps the rest.
How do I make LEFT return a number?
Wrap it in VALUE. LEFT always returns text, even from a number, so =VALUE(LEFT(A2,4)) turns the 2026 at the start of 20261103 into a number you can add up or compare.
What happens if num_chars is longer than the text?
LEFT returns the whole text, without an error.
Why is my LEFT formula not working?
The cell often holds something other than what you see. A space at the start shifts every character, so clean the text with TRIM first. A date is a serial number underneath, which is why LEFT returns digits like 4609 instead of the year.