If your LEFT formula is not working, check that the formula starts with an equals sign, refers to the cell you intend, and uses a nonnegative number of characters. In Excel, the basic formula is =LEFT(A2,3): with the text INV-4827 in A2, it returns INV.
What the LEFT function does
LEFT returns a specified number of characters from the beginning of a text string. Its syntax is LEFT(text,[num_chars]); the square brackets in this syntax mean that num_chars is optional. If you leave it out, Excel returns just the first character. If you ask for more characters than the text contains, Excel returns the whole string rather than an error.
For example, with INV-4827 in A2, =LEFT(A2,4) returns INV-. With the same cell layout, =LEFT(A2) returns I, and =LEFT(A2,0) returns an empty string. LEFT counts characters from the left, not words or digits specifically, so it includes spaces and punctuation if they fall within the requested number of characters. The function is not case-sensitive because it does not compare text; it simply returns characters as stored.
LEFT is useful for extracting a fixed-width code, an initial, or a known prefix. It does not automatically recognize where a word, hyphen, or other separator is. For that, combine it with a function that locates the separator.
Start with these quick checks
Before rebuilding a formula, check the most common causes. These checks often explain why the result looks wrong even though LEFT itself is available in your version of Excel:
- Confirm the referenced cell contains the text you want, and that the formula points to the correct row or column.
- Check that the formula begins with
=and that its parentheses are balanced. - Make sure the character count is zero or greater. A negative count produces a #VALUE! error.
- Look for spaces, punctuation, or hidden characters at the start of the source text.
- Check whether Excel is showing the formula itself instead of its result, or whether the formula cell is formatted as Text.
- If the result does not change after editing the source cell, check the workbook’s calculation setting.
Also check the formula separator used by your Excel installation. Most English-language installations use commas between arguments, as in =LEFT(A2,3). Some regional settings use semicolons instead. If Excel rejects a formula with a comma, try the separator expected by your installation, or use the function argument dialog to enter the arguments. This is a regional setting difference, not a different LEFT function.
Check the character count and the result
A frequent mistake is counting the wrong characters. LEFT includes every character from the first position, including spaces and hyphens. With ABC-739 in A2, =LEFT(A2,4) returns ABC-, not ABC. To return only the three letters in that example, use =LEFT(A2,3). Before choosing the count, inspect a few representative values: codes that seem similar may have different prefix lengths.
The number of characters must not be negative. With any source text in A2, =LEFT(A2,-1) returns #VALUE!. A zero count is allowed and returns an empty string; a count larger than the text length simply returns all available characters. If the formula is valid but gives too few or too many characters, the issue is usually the count or an incorrect cell reference rather than a calculation failure.
When extracting a prefix that ends before a delimiter, locate the delimiter instead of assuming every prefix has the same length. With INV-4827 in A2 and a hyphen separating the prefix from the number, =LEFT(A2,FIND("-",A2)-1) returns INV. FIND returns the position of the hyphen, and subtracting one excludes it. If some values do not contain a hyphen, FIND returns an error; decide what those rows should show rather than assuming every record follows the same pattern.
When Excel displays the formula instead of the answer
If a cell visibly contains =LEFT(A2,3) instead of a result, Excel may be treating the entry as text, or formula display may be turned on. First select the cell and inspect the formula bar. If the cell is formatted as Text, change its format to General using Home > Number Format, then re-enter the formula. Changing the format alone may not convert an existing text entry into a calculated formula; press F2 and then Enter, or type the formula again.
On Windows, Ctrl+` toggles Show Formulas, which displays formulas across the worksheet instead of their results. Press it again to switch back. The grave-accent key is usually near the upper-left of the keyboard, but its location varies. On Mac, Control+` is the common Show Formulas shortcut; keyboard layouts can differ. You can also look on the Formulas tab for the Show Formulas control. If every formula on the sheet is visible, this setting is more likely than a problem with LEFT.
A leading apostrophe can also make an entry text. If the formula bar shows an apostrophe before the equals sign, remove it and re-enter the formula. Check for a space before the equals sign as well. These characters can prevent Excel from interpreting what you typed as a formula.
Spaces, imported data, and numbers
LEFT does not clean or normalize its source. If A2 contains a leading space followed by INV-4827, a three-character extraction returns a space and IN. This often happens when data is pasted from a website, downloaded from another system, or imported from a text file. Select the source cell and look closely at the beginning of its contents; a leading space is easy to miss in a narrow column.
If the unwanted characters are ordinary spaces, you can use TRIM around the source. With text in A2 that may have extra spaces at the beginning or end, =LEFT(TRIM(A2),3) trims those spaces before extracting three characters. TRIM also reduces repeated internal spaces to single spaces, so it can alter more than just the start of a sentence. It does not remove every kind of invisible character, such as some nonbreaking spaces copied from web pages. If trimming does not fix the result, inspect or clean the source data using an approach suited to the actual character.
Numbers require special attention. LEFT returns text, and Excel works with the stored value rather than necessarily the number’s displayed format. If A2 contains the numeric value 123 but is displayed with a custom format that makes it look like 00123, LEFT may see only 123. If leading zeros are meaningful identifiers, store them as text when importing or entering the data. Do not assume that number formatting changes the underlying characters a formula can extract.
For a fixed five-digit display, with the numeric value 123 in A2 and a requirement to extract the first three digits of its zero-padded representation, =LEFT(TEXT(A2,"00000"),3) returns 001. This works because TEXT creates the five-character representation before LEFT extracts from it. Choose the format pattern to match the actual data requirement; padding a number is not appropriate if the zeros are not part of the identifier.
When a formula returns an error or stops updating
A #VALUE! result commonly points to a negative character count, an invalid value supplied as the count, or an error in a nested function. If you use FIND to locate a delimiter, a missing delimiter can cause an error before LEFT has a chance to return a prefix. Check the source value and each part of the formula separately. For a delimiter-based formula, confirm that the delimiter really appears in every row where the formula expects it.
A #NAME? error can mean Excel does not recognize a function name because it was misspelled, or because the formula was entered with incorrect punctuation. LEFT is available in current Excel versions, so a #NAME? result usually calls for checking the spelling, equals sign, and argument separators. A #REF! error means a reference is invalid, often because a referenced row, column, or cell was deleted. Review the cell reference shown in the formula bar.
If a result stays unchanged after you edit its source, check calculation mode in Formulas > Calculation Options. For ordinary use, select Automatic. If the workbook is set to Manual, formulas may not recalculate until you request calculation; F9 recalculates open workbooks in Excel for Windows. Calculation settings can affect the workbook more broadly, so be cautious about changing them in a shared file whose author intentionally uses manual calculation.
Copying LEFT formulas down a column
When you fill a formula down, Excel normally adjusts relative references. If A2 contains INV-4827, then B2 contains =LEFT(A2,3), and you copy B2 to B3, the reference changes to A3. That is usually what you want for a row-by-row extraction. If the formula keeps referring to the wrong source row, inspect whether the reference was locked with dollar signs or whether the formula was copied from an unexpected starting row.
To fill a formula down, enter it in the first result cell and drag the fill handle, or copy and paste it into the needed range. If the data is in an Excel table, a formula entered in a table column may fill through that calculated column automatically. Check a few rows after filling: a source cell that is blank, uses a different code pattern, or lacks a delimiter can create results that look inconsistent even when the formula copied correctly.
LEFT compared with related approaches
Use LEFT when the number of characters is fixed or when you can calculate the stopping point from a delimiter. Use MID when the characters begin at a position other than the left edge, and use RIGHT when you need characters from the end. These functions extract text; they do not split a string into fields automatically.
For a recurring import where fields are separated by a consistent delimiter, Excel’s Text to Columns feature may be more convenient than maintaining formulas. On Windows, select the data and choose Data > Text to Columns, then choose the delimiter and review the preview before finishing. This changes the worksheet data, so work on a copy or an empty destination area when you need to preserve the original column. For a one-off prefix extraction, a LEFT formula is often easier to audit and update.
Frequently Asked Questions
Why does my LEFT formula return only one character? If you omit the second argument, LEFT returns one character by default. Check that you have included the intended character count after the text reference and that the formula points to the expected cell.
Why does LEFT return a space or the wrong letters? The source may begin with a space, or the count may include a hyphen or another separator. Inspect the source value and count every character from the left, including invisible-looking spaces and punctuation.
Can LEFT extract text before a hyphen? Yes. With a hyphen in the source, combine LEFT with FIND to locate it and subtract one from its position. If some rows have no hyphen, decide how those rows should be handled because FIND will return an error for them.
Why does LEFT remove a leading zero? LEFT returns characters from the stored value, and a numeric value does not retain a leading zero just because a cell is formatted to display one. Keep identifiers with meaningful leading zeros as text, or create the required padded text explicitly before extracting it.
Does LEFT work in older versions of Excel? LEFT is a longstanding Excel text function and is not limited to Microsoft 365. The examples here use standard LEFT syntax; regional argument separators may vary with your system settings.
Related
- How to Insert a Full-Width Horizontal Line in Word
- How to Insert a Fillable Checkbox in Microsoft Word
- Open a ZIP File in Excel: Extract and Import Data
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Errors & fixes
- Excel VALUE Function Not Working? Fix Text-to-Number ErrorsIf Excel’s VALUE function returns #VALUE!, the text in the cell probably is not written in a number,…
- Excel File Format Is Not Valid: Causes and How to Fix ItIf Excel says a file format or file extension is not valid, first check that the file finished…
- Undo Wrap Text in Google Sheets and Fix Cell DisplayTo undo text wrapping in Google Sheets, select the wrapped cells and choose Format > Wrapping > Overflow.…
- Excel UNIQUE Spill Error: Causes, Fixes, and ExamplesIf Excel shows #SPILL! for a UNIQUE formula, it means Excel cannot place the formula’s results in the…
- MATCH Not Working in Excel? Fix Common Formula ErrorsIf MATCH is not working in Excel, first check the third argument: use 0 for an exact match,…
- Excel Data Validation Error: Causes, Fixes, and Tips ExplainedAn Excel data validation error means an entry conflicts with a rule set for that cell, such as…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.