The LEFT function in Excel extracts a set number of characters from the start of a text string. For example, =LEFT("Excel", 2) returns "Ex". Nothing needs to be installed or enabled — LEFT is a built-in function available in every modern version of Excel, including Excel for Microsoft 365, Excel 2021/2019, Excel for Mac, and Excel for the web.
What You'll Need
- A version of Excel that supports standard text functions (all current desktop, Mac, and web versions do).
- A cell containing text, or a text string you can type directly into the formula.
- Basic familiarity with entering formulas (starting with
=).
Step-by-Step
- Click the cell where you want the result. Choose an empty cell so the extracted text does not overwrite existing data.
- Type the formula. Start with
=LEFT(, then add the text or cell reference, a comma, and the number of characters you want. For example,=LEFT(A1, 4)returns the first four characters of the text in cell A1. - Press Enter. Excel displays the extracted characters in the cell and shows the formula in the formula bar.
- Copy the formula down if needed. Drag the fill handle (the small square at the bottom-right of the cell) down to apply the same formula to other rows. Relative cell references adjust automatically.
- Convert results to values if you plan to delete the source data. Select the results, press Ctrl+C (Cmd+C on Mac), then right-click and choose Paste Special > Values. This replaces the formulas with plain text so they no longer depend on the original cells.
Menu labels and dialog wording can differ slightly by Excel version, device, and region, but the formula syntax is the same across platforms.
Common Mistakes
- Forgetting the number argument.
=LEFT(A1)defaults to one character. If you need more, always include the count. - Using a negative or zero count.
=LEFT(A1, 0)returns an empty string, and a negative number returns a #VALUE! error. - Expecting LEFT to return numbers as numbers. LEFT always returns text, even if the extracted characters look like a number. Use
VALUE()or multiply by 1 if you need a numeric result. - Counting characters incorrectly. Spaces, punctuation, and leading apostrophes all count as characters. A cell that looks like " 123" has a leading space as its first character.
- Applying LEFT to dates. Dates are stored as serial numbers, so LEFT on a date cell returns the first digits of that serial number, not the displayed date text.
Tips
- Combine LEFT with
FINDorSEARCHto extract everything before a delimiter. For example,=LEFT(A1, FIND("@", A1) - 1)returns the part of an email address before the @ symbol. - Use
LENto check the total length of a string before deciding how many characters to extract. - Wrap the formula in
TRIMif the source text may contain extra spaces:=TRIM(LEFT(A1, 5)). - To extract from the end of a string instead, use the RIGHT function; for the middle, use MID.
- If you are on Excel for the web or Excel for Mac, the same LEFT syntax works; only the ribbon and menu locations differ.
Troubleshooting
- #VALUE! error: Check that the second argument is a positive number. If the text argument is a number formatted as text, LEFT still works, but a negative count does not.
- #NAME? error: The function name is misspelled or the formula is missing a parenthesis. Re-type
=LEFT(and ensure every opening parenthesis has a closing one. - Formula shows as text: The cell may be formatted as Text before you entered the formula. Change the format to General, then re-enter the formula.
- Unexpected characters: The source cell may contain hidden spaces or non-printing characters. Use
CLEANandTRIMon the source, or check withLEN. - Results do not update: Calculation may be set to Manual. Go to Formulas > Calculation Options and choose Automatic (wording varies by version).
- If that did not work: Close and reopen the workbook, or copy the formula into a new blank cell to rule out a corrupted entry. If the issue persists, check that the workbook is not in a protected view or shared mode that blocks edits.
Frequently Asked Questions
What does the LEFT function do in Excel?
It returns the first N characters from a text string, where N is a number you specify. It always returns text, even if the extracted characters are digits.
Can LEFT extract characters from the right side?
No. Use the RIGHT function for that. LEFT only works from the beginning of the string.
Does LEFT work with numbers?
Yes, but it treats the number as text and returns a text result. If you need a numeric value, wrap the result in VALUE().
How do I extract everything before a space or comma?
Use =LEFT(A1, FIND(" ", A1) - 1) for a space, or replace the space with your delimiter. FIND returns the position, and subtracting 1 stops before the delimiter.
Is LEFT case-sensitive?
LEFT itself is not case-sensitive; it simply counts characters. If you combine it with FIND, FIND is case-sensitive; use SEARCH for a case-insensitive match.
Why does LEFT return a #VALUE! error?
The most common cause is a negative number in the second argument. Make sure the count is zero or a positive integer.