# Excel LEFT Function: Syntax, Examples and Common Fixes
> Learn the Excel LEFT function: pull the first characters from text, use FIND when lengths vary, and stop numbers from turning into text.

- Web page: https://logicexcel.com/functions/left-function
- Language: en
- Also in: [Deutsch](https://logicexcel.com/de/functions/left-function.md), [Español](https://logicexcel.com/es/functions/left-function.md)
- Updated: 2026-11-03
- Practice this in the browser: https://logicexcel.com/practice/13

Use `=LEFT(A2,2)` to return the first two characters of the text in A2. On "ZA-JNB-0412" it returns "ZA". The second argument is how many characters to keep, and if you leave it out Excel returns just one. When the cut point moves from row to row, pair LEFT with FIND, as in `=LEFT(A2,FIND("-",A2)-1)`.

This page covers the Excel LEFT function from the basic call through the traps: results that are text when you wanted a number, dates that return serial digits, prefixes of different lengths, and the error you get when FIND finds nothing.

## TL;DR

- `=LEFT(text, [num_chars])` returns the first `num_chars` characters. Leave `num_chars` out and you get 1.
- If a prefix has a fixed length, hard-code it: `=LEFT(A2,2)`. If it varies, find the delimiter: `=LEFT(A2,FIND("-",A2)-1)`.
- LEFT always returns text. `=LEFT(B2,4)` on 20261103 gives "2026" as text, so wrap it in VALUE or add 0 before doing math.
- LEFT on a date returns the first digits of its serial number, not the year. Use YEAR or TEXT instead.
- To drop the last few characters, use `=LEFT(A2,LEN(A2)-5)`.
- Asking for more characters than exist is harmless: LEFT returns the whole text.

## Table of Contents

- [Sample data used on this page](#sample-data-used-on-this-page)
- [LEFT syntax](#left-syntax)
- [How to get the first characters of a cell](#how-to-get-the-first-characters-of-a-cell)
- [LEFT with FIND when the length varies](#left-with-find-when-the-length-varies)
- [LEFT on numbers returns text](#left-on-numbers-returns-text)
- [LEFT on dates gives serial digits](#left-on-dates-gives-serial-digits)
- [Remove characters from the end with LEFT and LEN](#remove-characters-from-the-end-with-left-and-len)
- [Nest LEFT and RIGHT to reach the middle](#nest-left-and-right-to-reach-the-middle)
- [Test or count rows by prefix](#test-or-count-rows-by-prefix)
- [LEFT compared with its alternatives](#left-compared-with-its-alternatives)
- [Excel versions that have LEFT](#excel-versions-that-have-left)
- [LEFT errors and their fixes](#left-errors-and-their-fixes)
- [What learners get wrong](#what-learners-get-wrong)
- [Worked scenario: split an order export](#worked-scenario-split-an-order-export)
- [Practice LEFT in the lessons](#practice-left-in-the-lessons)
- [FAQ](#faq)
- [Sources](#sources)

## Sample data used on this page

Every example uses this order export from a small online store. Column A is a text order ID in the pattern country, hub, sequence number. Column B is a date stamp stored as a number (year, month, day run together). Column C holds customer emails. Column D holds real Excel dates. Row 1 holds the headers.

| Row | A (Order ID) | B (Stamp) | C (Customer email) | D (Placed) |
|---|---|---|---|---|
| 2 | ZA-JNB-0412 | 20261103 | thabo.m@example.com | 2026-11-03 |
| 3 | UK-LDN-0877 | 20261102 | amy.carter@example.com | 2026-11-02 |
| 4 | USA-NYC-0231 | 20261031 | j.okafor@example.com | 2026-10-31 |
| 5 | ZA-CPT-0990 | 20261029 | lindiwe@example.com | 2026-10-29 |
| 6 | DE-BER-0054 | 20261027 | max.brandt@example.com | 2026-10-27 |
| 7 | USA-LAX-0618 | 20261026 | priya.s@example.com | 2026-10-26 |

Note that the country code in A4 and A7 has three letters, while the others have two. That difference is the reason a hard-coded `LEFT(A2,2)` is not always enough.

## LEFT syntax

```
=LEFT(text, [num_chars])
```

| Argument | Required? | What it does |
|---|---|---|
| text | Required | The text to take characters from. A cell reference, text in quotes, or a formula result. |
| num_chars | Optional | How many characters to return, counted from the start. Defaults to 1 when omitted. Must be zero or more. |

The rules that follow from that:

- `=LEFT(A2)` returns "Z", one character, because num_chars defaults to 1.
- `=LEFT(A2,50)` returns "ZA-JNB-0412", the whole text, because asking for more than exists is allowed.
- `=LEFT(A2,0)` returns an empty string.
- `=LEFT(A2,-1)` returns the `#VALUE!` error, because num_chars cannot be negative.

## How to get the first characters of a cell

This is the everyday use of the Excel LEFT function. Type `=LEFT(A2,2)` and fill down. The results are ZA, UK, US, ZA, DE and US.

Look at the third and sixth results. Row 4 is "USA-NYC-0231", and LEFT returned "US", which is a different country code than the one in the data. LEFT does what you tell it: two characters, no more. A hard-coded count is only safe when every value has a prefix of the same length. When you are not sure, look at the data first or switch to the FIND approach in the next section.

Also remember that the equals operator ignores case when you test LEFT's output. `=LEFT(A2,2)="za"` returns TRUE even though the text is upper case. If case matters, use `=EXACT(LEFT(A2,2),"za")`, which returns FALSE.

## LEFT with FIND when the length varies

For prefixes that end at a known character, let FIND locate that character and tell LEFT how many characters to take. FIND returns the position of the first match, so the prefix is one character shorter than that position.

```
=LEFT(A2,FIND("-",A2)-1)
```

On A2 the dash is at position 3, so LEFT keeps 2 characters and returns "ZA". On A4, "USA-NYC-0231", the dash is at position 4, so LEFT keeps 3 and returns "USA". One formula, filled down, handles both lengths.

The same pattern pulls a username from an email address. `=LEFT(C2,FIND("@",C2)-1)` returns "thabo.m", and `=LEFT(C5,FIND("@",C5)-1)` returns "lindiwe". The -1 stops the result before the @ sign, and forgetting it leaves the @ on the end.

FIND is case sensitive and does not accept wildcards. SEARCH is its forgiving sibling: `=LEFT(A3,SEARCH("-",A3)-1)` returns "UK". For a dash or an @ sign they behave the same. See the [FIND function guide](https://logicexcel.com/functions/find-function) for the differences.

If the delimiter might be missing, FIND returns `#VALUE!` and LEFT passes it along. `=LEFT(A2,FIND("@",A2)-1)` fails on an order ID with no @. Catch it with `=IFERROR(LEFT(A2,FIND("@",A2)-1),A2)`, which falls back to the full text.

Microsoft 365 users have a shorter route, covered in the comparison table below: `=TEXTBEFORE(C2,"@")` returns "thabo.m" without any counting.

## LEFT on numbers returns text

Column B holds numbers like 20261103. `=LEFT(B2,4)` returns "2026", but as text, not as a number. You can see the problem when you compare it. `=LEFT(B2,4)=2026` returns FALSE, because Excel treats the text "2026" and the number 2026 as different things.

Four ways to turn the result back into a number:

1. `=VALUE(LEFT(B2,4))` returns 2026 as a number.
2. `=LEFT(B2,4)+0` returns 2026, because math forces a conversion.
3. `=LEFT(B2,4)*1` does the same.
4. `=--LEFT(B2,4)` does the same with a double minus.

Use VALUE when you want the intent to be obvious to the next reader. The practical damage from text results shows up in SUMIF, lookups and pivot tables. A lookup of the number 2026 against a column of text "2026" returns #N/A, and a sum over text values returns 0.

LEFT also works on long numbers that you want to read as a block. `=LEFT(B2,6)` returns "202611", a year and month key you can group on.

## LEFT on dates gives serial digits

Column D holds true dates. Under the hood, Excel stores 3 November 2026 as the serial number 46329. LEFT looks at that stored number, not at what the cell displays. So `=LEFT(D2,2)` returns "46" and `=LEFT(D2,5)` returns "46329". Neither is a year.

To get the year, ask a date function: `=YEAR(D2)` returns 2026 as a number, and `=TEXT(D2,"yyyy")` returns "2026" as text. Use LEFT on dates only after converting them to text in a format you control, and for most jobs you will not need to.

## Remove characters from the end with LEFT and LEN

LEFT keeps the start, so to drop the end, compute how many characters to keep. Take the full length and subtract what you want gone:

```
=LEFT(A2,LEN(A2)-5)
```

The sequence suffix "-0412" is 5 characters, so this returns "ZA-JNB". If the suffix is not the same length on every row, use FIND for the cut point instead. For a wider look at removing characters from either end, the [LEN, LEFT, RIGHT and MID overview](https://logicexcel.com/functions/len-left-right-mid) walks through each direction on a single column.

## Nest LEFT and RIGHT to reach the middle

Two functions can reach text that neither reaches alone. Take the three-letter hub in the middle of "UK-LDN-0877". First keep the leading six characters, then keep the last three of that:

```
=RIGHT(LEFT(A3,6),3)
```

LEFT(A3,6) is "UK-LDN", and RIGHT of that with 3 is "LDN". The reverse order works too, since `=LEFT(RIGHT(A3,8),3)` also returns "LDN": RIGHT(A3,8) is "LDN-0877" and LEFT of that with 3 is "LDN".

The inner function runs first. If you read the formula inside out, each step is easy. For a single clean slice, [MID](https://logicexcel.com/functions/mid-function) does the same work in one function.

## Test or count rows by prefix

LEFT is useful inside tests. `=IF(LEFT(A2,2)="ZA","Domestic","Export")` returns "Domestic" for row 2, and the same formula pointed at A3 returns "Export".

To count rows by prefix, use SUMPRODUCT: `=SUMPRODUCT(--(LEFT(A2:A7,2)="ZA"))` returns 2. Or use a wildcard with COUNTIF: `=COUNTIF(A2:A7,"ZA*")` also returns 2, and it is simpler when you only need the count. The three-letter case works with `=SUMPRODUCT(--(LEFT(A2:A7,3)="USA"))`, which returns 2. See the [COUNTIF guide](https://logicexcel.com/functions/countif) for wildcard matching.

## LEFT compared with its alternatives

| Task | Best tool | Example |
|---|---|---|
| First N characters, N fixed | LEFT | `=LEFT(A2,2)` |
| Text before a delimiter | LEFT with FIND | `=LEFT(A2,FIND("-",A2)-1)` |
| Text before a delimiter, Microsoft 365 or Excel 2024 | TEXTBEFORE | `=TEXTBEFORE(A2,"-")` |
| Last N characters | RIGHT | `=RIGHT(A2,4)` |
| Characters from the middle | MID | `=MID(A2,4,3)` |
| Count rows starting with a prefix | COUNTIF wildcard | `=COUNTIF(A2:A7,"ZA*")` |
| Split a whole column in one go | Text to Columns, or TEXTSPLIT | Data tab, Text to Columns |

TEXTBEFORE is easier to read, but it does not exist in older Excel. LEFT with FIND runs everywhere, so it is the safer choice for a workbook other people will open. TEXTBEFORE returns "ZA" for `=TEXTBEFORE(A2,"-")`, the same as LEFT with FIND.

## Excel versions that have LEFT

LEFT is in every desktop version of Excel. Microsoft lists it for Microsoft 365 on Windows and Mac, Excel 2024, 2021, 2019 and 2016, and it works in Excel for the web. LEFTB, the byte-counting version for some Asian languages, is marked deprecated, so skip it.

TEXTBEFORE, mentioned above, is the newer arrival. Microsoft lists it for Microsoft 365 and Excel 2024 on Windows and Mac. It is not in Excel 2021 or 2019. The Microsoft page does not list Excel for the web, so if you work there, type `=TEXTBEF` into a cell and see whether autocomplete offers it.

## LEFT errors and their fixes

| What you see | Cause | Fix |
|---|---|---|
| `#VALUE!` | num_chars is negative, as in `=LEFT(A2,-1)`, or FIND failed inside it | Check the number. Wrap the FIND in IFERROR |
| Result looks right but will not sum or look up | LEFT returned text | Wrap in VALUE, or add 0 |
| "46" or "46329" from a date | LEFT read the serial number | Use YEAR or TEXT |
| Only one character comes back | num_chars was left out, so it defaulted to 1 | Add the second argument |
| Wrong country code on some rows | A fixed count on prefixes of unequal length | Use FIND to locate the delimiter |
| `#NAME?` | The name is misspelled, or TEXTBEFORE was used in a version without it | Fix the spelling, or use LEFT with FIND |
| An empty-looking result | num_chars was 0, or the source cell is blank | Check the cell and the number |

## What learners get wrong

Between 26 September and 3 November 2026, our [LEN, LEFT, and RIGHT Functions lesson](https://logicexcel.com/practice/13) recorded 7,811 first attempts, of which 63.4% were right. Each count is a first check of a screen in a page view, not a person.

The hardest screen asks learners to combine LEFT and RIGHT to return "love". It drew 799 first attempts and only 21.5% were right, the lowest rate among the lesson's four hardest screens. Accepted answers include `=right(left(a2,6),4)` and `=left(right(a2,10),4)`. The wrong answers fall into clear patterns.

1. **A missing comma.** 28 first attempts typed `=right(left(a2,6)4)`. The nesting was correct, but the comma between the inner function and the 4 was dropped. Excel will not accept it. The fix is to restore the comma, as in `=RIGHT(LEFT(A3,6),3)` on our order sheet.
2. **Stopping after one function.** 25 first attempts typed `=left(a2,6)` and 22 typed `=left(a2,4)`. Each is a valid formula, and each returns only the start of the text. The screen needs a second function to cut the unwanted characters from the front.
3. **Leaving the formula unfinished.** 18 first attempts submitted `=left(` and nothing more. If a formula feels too big to write in one go, write the inner function first, check what it returns, then wrap the outer one around it.
4. **Right nesting, wrong number.** 15 first attempts typed `=left(right(a2,6),4)`. Putting RIGHT inside LEFT is an accepted order, but the numbers must match the text. The accepted version is `=left(right(a2,10),4)`: RIGHT needs 10 characters, not 6, to keep the word intact.

The common thread is that the nested formula is two decisions: which function goes outside, and how many characters each one keeps. Write the intermediate result down on paper, as in LEFT(A3,6) giving "UK-LDN" earlier, and the numbers stop being guesses.

## Worked scenario: split an order export

Your manager sends the sample order export and asks for a summary by country and month, with a clean username list for a mailing.

1. Add a Country column. In E2 type `=LEFT(A2,FIND("-",A2)-1)` and fill down. You get ZA, UK, USA, ZA, DE and USA.
2. Add a Month key. In F2 type `=VALUE(LEFT(B2,6))` and fill down. Row 2 gives 202611 as a real number, ready for a pivot table or SUMIF.
3. Add a Username column. In G2 type `=LEFT(C2,FIND("@",C2)-1)` and fill down. Row 5 returns "lindiwe", row 2 returns "thabo.m".
4. Count domestic orders with `=COUNTIF(A2:A7,"ZA*")`, which returns 2.
5. Paste the three new columns as values before sending, so the formulas do not break when someone deletes the original columns.

The country count by LEFT with FIND is correct for USA because the delimiter, not a fixed number, sets the cut. That is the difference between a formula that works on today's rows and one that survives next month's export.

## Practice LEFT in the lessons

The fastest way to learn the Excel LEFT function is to type it. Start with [Lesson 13, LEN, LEFT, and RIGHT Functions](https://logicexcel.com/practice/13), where you type each formula and it is checked on the spot. When you can nest two functions without a pause, move on to [Lesson 62, LEN, LEFT, RIGHT, MID Practice](https://logicexcel.com/practice/62).

For the full family of text tools, the [Excel text functions guide](https://logicexcel.com/functions/text-functions) is the best next read.

## FAQ

### How do I use the LEFT function in Excel?

Type `=LEFT(A2,3)`, replacing A2 with your cell and 3 with the number of characters to keep. Excel returns that many characters from the start of the text. If you leave the number out, Excel returns just the first character. The result is always text.

### How do I extract text before a certain character in Excel?

Use LEFT with FIND: `=LEFT(A2,FIND("-",A2)-1)`. FIND gives the position of the dash and the minus 1 stops just before it. In Microsoft 365 or Excel 2024, `=TEXTBEFORE(A2,"-")` does the same without the arithmetic.

### Why does LEFT return text instead of a number?

LEFT always returns text, even when the characters are digits. Excel will not add or look up that text as a number. Convert it with `=VALUE(LEFT(B2,4))`, or add zero as in `=LEFT(B2,4)+0`. After conversion, SUMIF, lookups and pivot tables treat it as a number.

### What happens if num_chars is larger than the text?

Nothing goes wrong. LEFT returns the entire text. `=LEFT(A2,50)` on an 11-character order ID returns all 11 characters. This makes LEFT safe to use with a generous number when you want everything up to a cap.

### Why does LEFT on a date return strange digits?

Excel stores a date as a serial number, and LEFT reads that number. The date 3 November 2026 is stored as 46329, so `=LEFT(D2,2)` returns "46". To get the year, use `=YEAR(D2)`, or `=TEXT(D2,"yyyy")` for text.

### How do I remove the last characters from text in Excel?

Combine LEFT with LEN: `=LEFT(A2,LEN(A2)-5)` removes the last five characters. LEN counts the total, you subtract what you want gone, and LEFT keeps the rest. If the suffix length varies, use FIND to locate where it starts.

## Sources

- [LEFT function, Microsoft Support](https://support.microsoft.com/en-us/office/left-leftb-functions-9203d2d2-7960-479b-84c6-1ea52b99640c)
- [TEXTBEFORE function, Microsoft Support](https://support.microsoft.com/en-us/office/textbefore-function-d099c28a-dba8-448e-ac6c-f086d0fa1b29)
