LEFT Function

Excel Functions › Text

All Excel versions Text

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.


Quick answer: to grab the first 2 characters of the text in A2:
=LEFT(A2, 2)
Omit the second argument and LEFT returns just the first character. To take everything before a delimiter instead of a fixed count, combine with FIND: =LEFT(A2, FIND("-", A2) - 1).

Syntax

=LEFT(text, [num_chars])
ArgumentDescription
textRequiredThe text string (or cell reference) to extract from.
num_charsOptionalHow 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:

AB
1CodeState
2TX-0042TX
3OK-1187OK
4NM-0916NM
=LEFT(A2, 2) // returns "TX"

For a single character — an initial, a grade letter, a leading flag — the second argument can be omitted entirely:

=LEFT(A2) // returns "T", num_chars defaults to 1

Try it: interactive LEFT demo

Live 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:

=LEFT(A2, FIND(" ", A2) - 1) // "Sarah Connor" becomes "Sarah"

Everything before a hyphen, however long the prefix is:

=LEFT(A2, FIND("-", A2) - 1) // "AUSTIN-0042" becomes "AUSTIN"

Chop a fixed number of characters off the end by combining with LEN:

=LEFT(A2, LEN(A2) - 4) // drops the last 4 characters

And when the extracted characters are really a number, wrap in VALUE so math and lookups work:

=VALUE(LEFT(A2, 4)) // "2026-06-11" becomes the number 2026

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

📊
Download the free LEFT practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

How do I extract the first word with LEFT?
Combine it with FIND to locate the first space: =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?
LEFT is a text function, so its output is always a text string — even "2026". Convert with =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?
Nothing bad — LEFT returns the whole string. =LEFT("TX", 10) returns "TX". Only a negative num_chars causes an error.
Why does LEFT on a date give me weird digits?
Dates are stored as serial numbers (June 11, 2026 is 46184), and LEFT sees the serial, not the display. Use =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?
If everyone opening the file has Excel 365, TEXTBEFORE is cleaner for delimiter-based extracts: =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

Related functions: RIGHT · MID · LEN · FIND · TEXTBEFORE · SUBSTITUTE