The Excel LEFT function returns the first characters of a text string — the leftmost 2, 5, or however many you ask for. It is the workhorse for peeling prefixes off codes, grabbing initials, and (paired with FIND) pulling the first word out of anything. Simple on its own, surprisingly powerful in combos.
=LEFT(A2, FIND("-", A2) - 1).
Syntax
| Argument | Description | |
|---|---|---|
text | Required | The text string (or cell reference) to extract from. |
num_chars | Optional | How many characters to take from the left. Default is 1. Must be zero or positive; if it exceeds the length of the text, LEFT simply returns the whole string. |
Available in: every version of Excel ever shipped. The result is always text, even when the characters look like digits — see the pitfalls section below.
Grab a fixed-length prefix
Location codes in column A always start with a two-letter state. One formula in B2, filled down, splits the prefix off:
| A | B | |
|---|---|---|
| 1 | Code | State |
| 2 | TX-0042 | TX |
| 3 | OK-1187 | OK |
| 4 | NM-0916 | NM |
For a single character — an initial, a grade letter, a leading flag — the second argument can be omitted entirely:
Try it: interactive LEFT demo
Drag the slider and watch LEFT scoop characters off the front of the sample string.
Dynamic extracts with LEFT + FIND
A fixed count breaks the moment string lengths vary. The classic fix: let FIND locate the delimiter, subtract 1, and feed that to LEFT. First word of a full name:
Everything before a hyphen, however long the prefix is:
Chop a fixed number of characters off the end by combining with LEN:
And when the extracted characters are really a number, wrap in VALUE so math and lookups work:
Modern alternative: in Excel 365, TEXTBEFORE does the delimiter version in one step — =TEXTBEFORE(A2, "-") — with no arithmetic. LEFT remains the compatible-everywhere choice.
Errors & common pitfalls
#VALUE! — negative num_chars. num_chars must be zero or greater. The usual culprit is a LEFT + FIND combo where FIND returned 1 and you subtracted more than 1 — or FIND itself erroring because the delimiter is missing. Wrap the combo in IFERROR to catch both.
Pitfall: the result is text, not a number. =LEFT("2026 Budget", 4) returns the text "2026". It sorts as text, fails numeric comparisons, and will not match the number 2026 in a lookup. Wrap in VALUE() (or add 0) when you need a real number.
Pitfall: dates are not what they look like. A cell showing 6/11/2026 actually contains the serial number 46184 — so LEFT(A2, 2) returns "46", not "6/". Use TEXT first (=LEFT(TEXT(A2, "m/d/yyyy"), 2)) or better, use MONTH/DAY/YEAR.
Pitfall: num_chars longer than the text. Not an error — LEFT quietly returns the entire string. Handy when intentional, baffling when a typo.
Practice workbook
Frequently asked questions
How do I extract the first word with LEFT?
=LEFT(A2, FIND(" ", A2) - 1). Wrap in IFERROR returning A2 itself to handle one-word cells that have no space.Why does LEFT return a number as text?
=VALUE(LEFT(A2, 4)) or append +0 to the formula when you need real numbers for math or lookups.What happens if num_chars is bigger than the text?
=LEFT("TX", 10) returns "TX". Only a negative num_chars causes an error.Why does LEFT on a date give me weird digits?
=LEFT(TEXT(A2, "mm/dd/yyyy"), 2) to work with the formatted text, or use the MONTH function instead.LEFT vs TEXTBEFORE - which should I use?
=TEXTBEFORE(A2, "-"). LEFT works in every Excel version ever made and is still the right tool for fixed-length prefixes.Master functions like this in one day
This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class