LEFT — Extract Characters from the Start
The most fundamental Excel text function. Give it a string and a number, get back the first N characters. Together with RIGHT and MID it forms the classic text-extraction trio — and paired with FIND it becomes the workhorse for parsing emails, filenames, structured codes, and anything else where you need to slice out just the beginning.
Syntax breakdown
LEFT takes two arguments. Only the first is required.
| Argument | Type | What it does |
|---|---|---|
text |
REQUIRED | The source string. Cell reference, literal text in quotes, number (converted to text), or the result of another function. |
num_chars |
OPTIONAL | How many characters to extract from the start. Must be zero or positive. If omitted, defaults to 1. If greater than the string length, returns the whole string (no error). |
Five working examples
Every example uses the 10-row structured-text table from the workbook — product codes, phone numbers, emails, filenames, and order IDs.
01 Fixed-length prefix — extract the type code
Product codes start with a 3-letter type prefix: REG for regional or INT for international. Pull just those 3 characters.
REG-WA-2026-001| Product Code | Type (LEFT 3) | State (MID 5,2) | Year (MID 8,4) | Seq (RIGHT 3) |
|---|---|---|---|---|
| REG-WA-2026-001 | REG | WA | 2026 | 001 |
| REG-CA-2026-002 | REG | CA | 2026 | 002 |
| INT-EU-2026-003 | INT | EU | 2026 | 003 |
| REG-CA-2026-004 | REG | CA | 2026 | 004 |
| INT-AS-2026-005 | INT | AS | 2026 | 005 |
Once you have the type extracted, you can filter, sort, group, or use it in COUNTIF/SUMIF to aggregate regional vs. international records. LEFT turns a monolithic code column into structured data.
02 Area code from phone number
Phone numbers formatted as 512-555-0142 have the area code as the first 3 characters. Perfect LEFT use case.
512-555-0142Aggregate by area code
The pattern generalizes: LEFT extracts the field you want to group by, then any *IF function aggregates on it. Useful for regional analysis, area-code demographics, or any "how many by prefix" question.
03 Building initials from names
Take just the first letter of a name — for badges, avatar labels, or condensed reports.
"Emma Thompson" — or just =LEFT(A2) since 1 is the defaultTwo-letter initials (first + last)
Initials for an entire full-name column
04 LEFT + FIND — the killer pattern
When you don't know exactly HOW MANY characters to take — because it varies per row — use FIND to locate a delimiter and LEFT to grab everything before it.
Extract email username (everything before @)
emma.thompson@acmecorp.comReading the formula: FIND("@", D2) returns the position of the "@" sign — say, 14 for Emma's email. Subtract 1 so LEFT stops at position 13 (just before the "@"). Result: the whole username, regardless of how long or short it is.
| FIND("@") | Username (LEFT+FIND) | |
|---|---|---|
| emma.thompson@acmecorp.com | 14 | emma.thompson |
| d.kim@acmecorp.com | 6 | d.kim |
| sofia.r@acmecorp.com | 8 | sofia.r |
| mchen@acmecorp.com | 6 | mchen |
| aisha.patel@acmecorp.com | 12 | aisha.patel |
Extract filename base (before the extension dot)
Q1-Report-2026.pdf — same pattern with "." instead of "@"05 First word from any sentence
Extract the first word from a phrase where you don't know its length. Same LEFT+FIND pattern with a space as the delimiter.
"Emma Thompson" — everything before the first spaceWhat if there's no space?
FIND returns a VALUE error when it can't find the search string. Wrap in IFERROR for safety:
Case-insensitive alternative — SEARCH
LEFT(A2, 3) only work when data is PERFECTLY structured. If someone types WAS instead of WA, or REGION instead of REG, your formula silently returns wrong results. The moment your data might vary, switch to the LEFT+FIND pattern from Example 4. It self-adjusts to whatever length the actual content has.Interactive playground
Try it Live LEFT demonstration
Mirrors live cells from the workbook. Edit the yellow inputs → the blue answer updates.
Download the workbook to try LEFT patterns across the full 10-row structured-text table.
The LEFT cheat sheet — 10 patterns for daily use
Copy any of these, adapt to your data, and you're 80% of the way there:
10 patterns you'll use every day
From simplest fixed-length pulls to dynamic LEFT+FIND combos.
The Text-Extract family — three ways to slice
Meet the family
Excel has three foundational text-slicing functions. Each pulls from a different position. This page is LEFT — starts from the beginning.
All three pair with FIND to make position-hunting dynamic. All three ship in every Excel version since 1.0. Reach for LEFT when you know your data always starts with the piece you want.
Excel 365 alternative — TEXTBEFORE
Common errors and how to fix them
LEFT rarely errors on its own, but the FIND part of LEFT+FIND does. Six common scenarios:
| Result | Why it happens | Broken → Fix |
|---|---|---|
| VALUE error | FIND didn't find the search string. Common when data is inconsistent. | =LEFT(A2, FIND("@", A2)-1) // errors on "no email" text
=IFERROR(LEFT(A2, FIND("@", A2)-1), A2) |
| Wrong content | Hardcoded length assumed structure that doesn't hold. | =LEFT(A2, 3) // gets "REG" but breaks on "REGION-..."
=LEFT(A2, FIND("-", A2)-1) // dynamic |
| Empty result | Passed 0 as num_chars — returns an empty string. | =LEFT(A2, 0) // returns ""
Use a positive number, or omit for default=1 |
| Negative error | num_chars is negative — LEFT returns VALUE. | =LEFT(A2, FIND("X", A2) - 5) // if X is at position 3
Wrap in MAX(0, …) or IFERROR |
| Full string returned | num_chars was larger than the string length. Not an error — just returns everything. | =LEFT("Hi", 100) // returns "Hi", no warning
Usually fine, but combine with MIN(LEN, ...) if you need to detect it |
| Wrong char count | Extra whitespace in source that you didn't account for. | =LEFT(" Emma", 3) // returns " E" including spaces
=LEFT(TRIM(A2), 3) |
Related functions
Complementary functions
Excel version compatibility
LEFT has been in Excel since version 1.0 (1985). Every platform supports it identically:
| Platform | Supports LEFT? | Notes |
|---|---|---|
| Excel 365 (Windows & Mac) | ✓ Yes | Full support |
| Excel 2021 / 2019 / 2016 / 2013 / 2010 / 2007 / 2003 | ✓ Yes | Full support |
| Excel for the web | ✓ Yes | Full support |
| Excel on iPad & iPhone | ✓ Yes | Full support |
| Google Sheets | ✓ Yes | Same syntax |
| LibreOffice Calc | ✓ Yes | Full support |
| Apple Numbers | ✓ Yes | Full support |
LEFTB for double-byte character sets (Japanese, Chinese, Korean). LEFTB counts bytes instead of characters. If your workbook doesn't specifically need byte-based counting, stick with regular LEFT — it handles Unicode correctly.
When to use LEFT vs. alternatives
Use LEFT when…
- The piece you want is at the start of the string. That's the whole point of LEFT.
- You need universal Excel support. LEFT works in every version, every platform.
- You're building a cross-version workbook. LEFT+FIND is universally understood.
Use TEXTBEFORE (Excel 365) instead when…
- You're on Excel 365 and don't need backward compatibility.
- You want the cleanest possible syntax for "everything before a delimiter."
Use RIGHT instead when…
- The piece you want is at the END of the string.
- You're extracting file extensions, last-4 of phone/SSN, or trailing suffixes.
Use MID instead when…
- The piece you want is in the MIDDLE — not the start, not the end.
- You know both the start position and the length.
Use LEFT+FIND instead of just LEFT when…
- The length of what you want VARIES from row to row.
- There's a consistent delimiter (@, ., -, space) marking where "before" ends.
How LEFT actually works
The algorithm
LEFT reads the source text from position 1 onward and returns exactly num_chars characters. If num_chars is greater than the string length, LEFT returns the full string with no error — a defensive-by-default behavior.
Number and date handling
If you pass a number, Excel converts it to text using its default representation (not the cell's display format). So LEFT(1234.5, 2) returns "12". Dates become their serial-number text — LEFT(TODAY(), 4) returns something like "4602", not a year. Always wrap in TEXT() if you want formatted output: =LEFT(TEXT(TODAY(), "yyyy-mm-dd"), 4) returns the year as text.
What num_chars=0 does
LEFT with num_chars=0 returns an empty string — not an error. This can be useful in conditional formulas where you sometimes want no output.
Negative num_chars
A negative num_chars returns a VALUE error. Guard against it with MAX(0, …) when computing num_chars from another formula that might go negative.
Performance notes
LEFT is one of the fastest Excel functions. It just reads N characters from position 1 — near-zero overhead.
- Even at scale. A million LEFT calls recalc in fractions of a second.
- LEFT+FIND slightly slower. FIND does a full string search per call. Still fast, but not free.
- Volatile inputs. If your source cell uses NOW() or RAND(), LEFT recomputes on every recalc. Not LEFT's fault.
How to write a LEFT from scratch
-
Identify the source cell or string
What are you extracting FROM? A cell reference, a literal, or another function's output.
-
Decide: fixed or variable length?
Is the piece you want always the same length (like a 3-char prefix)? Or does it vary (like an email username)?
-
Fixed → just use a number
=LEFT(A2, 3). Simplest form. -
Variable → use LEFT+FIND
=LEFT(A2, FIND("delimiter", A2) - 1). Subtract 1 to stop before the delimiter. -
Add IFERROR if data may be inconsistent
=IFERROR(LEFT(A2, FIND(" ", A2)-1), A2). Returns the whole string as fallback.
Functions used with LEFT
Frequently asked questions
What's the difference between LEFT and RIGHT?
LEFT extracts characters from the START of a string; RIGHT extracts from the END. Same syntax, opposite direction. LEFT("REG-WA", 3) returns "REG"; RIGHT("REG-WA", 2) returns "WA".
What happens if num_chars is larger than the string?
LEFT returns the whole string with no error. So LEFT("Hi", 100) returns "Hi". This is defensive-by-default — LEFT never errors just because you asked for more than exists.
How do I use LEFT with FIND for email splits?
=LEFT(A2, FIND("@", A2) - 1) returns everything before the "@". FIND locates the "@" position; subtract 1 so LEFT stops just before it. Wrap in IFERROR if some rows might lack the "@".
Does LEFT work in Google Sheets?
Yes, identically. LEFT works the same way in Google Sheets, LibreOffice, and Apple Numbers — all follow the Excel syntax.
What's LEFTB and do I need it?
LEFTB counts BYTES instead of characters — useful when working with double-byte character sets (Japanese, Chinese, Korean) at the byte level. Regular LEFT handles Unicode correctly for most uses. You almost certainly want LEFT, not LEFTB.
Can LEFT return a number instead of text?
No — LEFT always returns text. Even if you extract "123" from "12345", the result is text "123", not the number 123. Wrap in VALUE() or double-negative -- to convert: =VALUE(LEFT(A2, 3)).
Why does LEFT return spaces from my data?
Your source has leading whitespace. Wrap in TRIM: =LEFT(TRIM(A2), 3) removes any leading spaces before extracting.
How do I extract the first word?
=LEFT(A2, FIND(" ", A2) - 1) returns everything before the first space. For strings with no space, wrap in IFERROR to return the whole string as fallback.
What's the maximum length LEFT can return?
32,767 characters — Excel's cell text limit. LEFT can't return more than a cell can hold. In practice you'll never approach this limit with LEFT.
Is LEFT case-sensitive?
LEFT itself preserves case — it doesn't change it. But when paired with FIND, remember FIND is case-sensitive. Use SEARCH for case-insensitive matching: =LEFT(A2, SEARCH(" ", A2) - 1).
Should I use LEFT or TEXTBEFORE?
TEXTBEFORE is cleaner for the common "everything before a delimiter" case but only works in Excel 365. For cross-version compatibility, use LEFT+FIND. Same result, universal support.
Which templates use LEFT?
Most templates that parse structured IDs or codes. Prominently: Invoice (extract customer prefix from ID), Sales Dashboard (region prefix from product code), KPI Dashboard (metric-type prefix), Employee Attendance (badge prefix), Timesheet (project code prefix), Inventory Tracker (SKU category), Project Timeline (phase code), and Expense Report (category prefix).
Templates that use LEFT
8 of our 10 templates use LEFT for parsing structured IDs, codes, and prefixes:
Skip the syntax. Ask in plain English.
The Sheets & Cells AI Add-in writes LEFT, LEFT+FIND, and every text-extraction pattern — right inside Excel. Type "get everything before the @ sign" and get the working formula, ready to paste.
Try the AI Add-in →