LEFT in Excel: Extract the First N Characters | 5 Examples + Cheat Sheet | Sheets & Cells
Function · Text

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.

✓
Universal support since Excel 1.0
Works identically in Excel 365, 2021, 2019, 2016, 2013, 2010, 2007, 2003, Excel for the web, Google Sheets, LibreOffice, and Apple Numbers. Same for FIND and SEARCH (used with LEFT for dynamic positions). Ship your workbook to anyone on any version — LEFT just works.
Quick answer
LEFT pulls a specified number of characters from the START of a text string and returns them as a new string. Two arguments: the source text, and how many characters to take from the beginning.
Syntax
=LEFT(text, [num_chars])
Working example
=LEFT("REG-WA-2026-001", 3) → Returns "REG" — the first 3 characters. If num_chars is omitted, LEFT returns just the first character. =LEFT("REG-WA-2026-001") returns "R".
📗 Free LEFT + RIGHT + MID example workbook
9 sheets · 10-row structured-text table · LEFT basics · RIGHT basics · MID basics · full code parse · LEFT+FIND killer pattern · 10-pattern cheat sheet · compatibility matrix
Download .xlsx (free) Open in Sheets
Category
Text
Difficulty
Beginner
Excel version
All (1.0+)
Companion
FIND
1985
In Excel since v1.0
2
Arguments (1 required)
100%
Cross-version support
8/10
Templates using it

Syntax breakdown

LEFT takes two arguments. Only the first is required.

ArgumentTypeWhat 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).
Character counting note: LEFT counts characters, not bytes. So Unicode characters (emoji, accented letters, CJK ideographs) each count as one character in modern Excel. Older versions on some platforms may count bytes for multi-byte characters, but any modern Excel handles this correctly.

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.

=LEFT(B2, 3)
→ Returns "REG" from REG-WA-2026-001
Product CodeType (LEFT 3)State (MID 5,2)Year (MID 8,4)Seq (RIGHT 3)
REG-WA-2026-001REGWA2026001
REG-CA-2026-002REGCA2026002
INT-EU-2026-003INTEU2026003
REG-CA-2026-004REGCA2026004
INT-AS-2026-005INTAS2026005

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.

=LEFT(C2, 3)
→ Returns "512" from 512-555-0142

Aggregate by area code

=COUNTIF(D:D, LEFT(C2, 3))
→ Combine LEFT with COUNTIF to count how many customers share an 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.

=LEFT(A2, 1)
→ Returns "E" from "Emma Thompson" — or just =LEFT(A2) since 1 is the default

Two-letter initials (first + last)

=LEFT(A2, 1) & LEFT(B2, 1)
→ Returns "ET" from "Emma" + "Thompson"

Initials for an entire full-name column

=LEFT(A2, 1) & LEFT(MID(A2, FIND(" ", A2)+1, LEN(A2)), 1)
→ Takes 1 char from before the space + 1 char from after. "Emma Thompson" → "ET". MID + FIND make it dynamic.

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 @)

=LEFT(D2, FIND("@", D2) - 1)
→ Returns "emma.thompson" from emma.thompson@acmecorp.com

Reading 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.

EmailFIND("@")Username (LEFT+FIND)
emma.thompson@acmecorp.com14emma.thompson
d.kim@acmecorp.com6d.kim
sofia.r@acmecorp.com8sofia.r
mchen@acmecorp.com6mchen
aisha.patel@acmecorp.com12aisha.patel

Extract filename base (before the extension dot)

=LEFT(E2, FIND(".", E2) - 1)
→ Returns "Q1-Report-2026" from Q1-Report-2026.pdf — same pattern with "." instead of "@"
This is the #1 real-world use of LEFT. Almost every "clean up this column of messy strings" job comes down to LEFT+FIND. Learn this pattern and 80% of Excel text problems become one-formula fixes.

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.

=LEFT(A2, FIND(" ", A2) - 1)
→ Returns "Emma" from "Emma Thompson" — everything before the first space

What if there's no space?

FIND returns a VALUE error when it can't find the search string. Wrap in IFERROR for safety:

=IFERROR(LEFT(A2, FIND(" ", A2) - 1), A2)
→ If there's no space, return the whole string as-is. Sensible fallback for single-word inputs.

Case-insensitive alternative — SEARCH

=LEFT(A2, SEARCH(" ", A2) - 1)
→ SEARCH works exactly like FIND but is case-insensitive. For finding a space it doesn't matter, but for letters it does.
⚠️
The fixed-position trap
Hardcoded lengths like 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.

Input · Product code
REG-WA-2026-001
Output · First 3 chars
REG
=LEFT(B2, 3)
Input · Email
emma.thompson@acmecorp.com
Output · Username
emma.thompson
=LEFT(D2, FIND("@", D2) - 1)

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.

1First N chars (fixed)
=LEFT(A2, 3)
Grab the first 3 characters. Rigid but simple.
2Just the first char
=LEFT(A2)
Omit num_chars — defaults to 1. First letter of a name.
3Email username
=LEFT(A2, FIND("@", A2) - 1)
Everything before the "@". Dynamic — works for any length.
4First word
=LEFT(A2, FIND(" ", A2) - 1)
Everything before the first space. Great for "First Last" pairs.
5Filename base
=LEFT(A2, FIND(".", A2) - 1)
Everything before the "." — filename without extension.
6Everything before dash
=LEFT(A2, FIND("-", A2) - 1)
Common for structured codes with dash separators.
7Safe with IFERROR
=IFERROR(LEFT(A2, FIND(" ", A2)-1), A2)
Handles rows without the delimiter — returns the whole string.
8Truncate long strings
=LEFT(A2, 20) & IF(LEN(A2)>20, "...", "")
First 20 chars + ellipsis if truncated. UI-friendly.
9Half the string
=LEFT(A2, LEN(A2)/2)
First half of a string. Combine LEN for proportional pulls.
10Extract number prefix
=LEFT(A2, MATCH(FALSE, ISNUMBER(--MID(A2, ROW(INDIRECT("1:"&LEN(A2))), 1)), 0)-1)
Advanced: pull the leading digits from mixed strings like "123abc".

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

If you're on Excel 365, TEXTBEFORE replaces the common LEFT+FIND pattern with cleaner syntax. Same result, half the formula. LEFT still works everywhere — TEXTBEFORE is only for modern Excel.
Old way (universal)
=LEFT(A2, FIND("@", A2) - 1)
New way (Excel 365)
=TEXTBEFORE(A2, "@")

Common errors and how to fix them

LEFT rarely errors on its own, but the FIND part of LEFT+FIND does. Six common scenarios:

ResultWhy it happensBroken → 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)
📗 Every example above, in one workbook
Basic LEFT · phone area codes · initials · LEFT+FIND email split · LEFT+FIND filename base · cheat sheet · compat matrix.
Download text-extract-examples-2026.xlsx

Related functions

Complementary functions

Excel version compatibility

LEFT has been in Excel since version 1.0 (1985). Every platform supports it identically:

PlatformSupports LEFT?Notes
Excel 365 (Windows & Mac)✓ YesFull support
Excel 2021 / 2019 / 2016 / 2013 / 2010 / 2007 / 2003✓ YesFull support
Excel for the web✓ YesFull support
Excel on iPad & iPhone✓ YesFull support
Google Sheets✓ YesSame syntax
LibreOffice Calc✓ YesFull support
Apple Numbers✓ YesFull support
Special variants: Some Excel versions include 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

  1. Identify the source cell or string

    What are you extracting FROM? A cell reference, a literal, or another function's output.

  2. 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)?

  3. Fixed → just use a number

    =LEFT(A2, 3). Simplest form.

  4. Variable → use LEFT+FIND

    =LEFT(A2, FIND("delimiter", A2) - 1). Subtract 1 to stop before the delimiter.

  5. Add IFERROR if data may be inconsistent

    =IFERROR(LEFT(A2, FIND(" ", A2)-1), A2). Returns the whole string as fallback.

Functions used with LEFT

🎁 Grab the free LEFT + RIGHT + MID workbook
9 sheets covering everything on this page — basics, LEFT+FIND patterns, structured code parsing, cheat sheet.
Download text-extract-examples-2026.xlsx

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 →