Text
LEFT Function in Excel
Returns the specified number of characters from the start of a text string.
Syntax
- =LEFT(text, [num_chars])
Arguments
- text (required): The text string to extract from
- num_chars (optional): Number of characters to extract (default 1)
Examples
- =LEFT("Hello World", 5) - Extract first 5 characters - Result: Hello
- =LEFT(A1, 3) - Get first 3 characters from cell - Result: Hel
Excel LEFT function documentation
- LEFT is a Text function that returns the first num_chars characters from the start of a text string.
- Syntax: =LEFT(text, [num_chars]). If num_chars is omitted, Excel returns the first character only.
- Use for fixed-width codes, area codes, leading IDs, and prefix extraction before delimiters.
- Related: [RIGHT](/functions/right/), [MID](/functions/mid/), [TEXTBEFORE](/functions/textbefore/) in M365.
LEFT syntax and behavior
- text (required): cell reference or string to extract from.
- num_chars (optional): number of characters from the left; if larger than text length, returns entire string.
- Numbers are coerced to text — LEFT(12345, 2) returns "12" as text.
- Combine with [FIND](/functions/find/) when length depends on a delimiter position.
Step-by-step: extract area code from phone list
- Step 1 — Phone numbers in A2:A500 as text like "555-123-4567".
- Step 2 — Fixed prefix: =LEFT(A2, 3) when area code is always 3 digits.
- Step 3 — With delimiter: =LEFT(A2, FIND("-", A2)-1) when format is consistent.
- Step 4 — Copy down and spot-check rows with different formats manually.
- Step 5 — For delimiter-based splits in M365 use [TEXTBEFORE](/functions/textbefore/) instead.
LEFT vs MID vs RIGHT vs TEXTBEFORE
- LEFT — characters from the start by fixed count.
- MID — characters from any middle position and length.
- RIGHT — characters from the end.
- Compare: [LEFT vs MID vs RIGHT](/compare/left-vs-mid-vs-right/) · M365 [TEXTBEFORE](/functions/textbefore/) for split-by-delimiter.
Worked examples to copy
- First name from "First Last": =LEFT(A2, FIND(" ", A2)-1) when one space separates names.
- Product prefix SKU-12345: =LEFT(A2, 3) returns "SKU" if always 3 chars.
- Year from yyyy-mm-dd text: =LEFT(A2, 4).
- Pad check: =LEN(LEFT(A2,5)) verifies extraction width in audit column.
People also ask
- What does LEFT do in Excel? — Returns characters from the left side of a string.
- LEFT with no second argument? — Returns only the first character.
- LEFT on numbers? — Coerces number to text before extracting.
- LEFT vs TEXTBEFORE? — LEFT uses character count; TEXTBEFORE splits at delimiter in modern Excel.
Common errors
- Returns empty if num_chars is 0
- #VALUE! if num_chars is negative
Use cases
- Extracting area codes
- Getting initials
- Parsing codes
Frequently asked questions
- What is the LEFT function in Excel? LEFT extracts a specified number of characters from the beginning of a text string. The syntax is =LEFT(text, [num_chars]). For example, =LEFT("Hello World", 5) returns "Hello". If num_chars is omitted, it defaults to 1. LEFT is essential for parsing data like extracting area codes, prefixes, or initials from text.
- What is the difference between LEFT, RIGHT, and MID? LEFT extracts from the start, RIGHT from the end, MID from any position. LEFT: =LEFT("ABCDE", 2) returns "AB". RIGHT: =RIGHT("ABCDE", 2) returns "DE". MID: =MID("ABCDE", 2, 3) returns "BCD" (starts at position 2, takes 3 characters). Use these together for complex text parsing.
- How do I extract text before a specific character? Combine LEFT with FIND or SEARCH: =LEFT(A1, FIND("-", A1)-1) extracts text before the first hyphen. FIND is case-sensitive, SEARCH is not. For example, if A1 is "ABC-123", this returns "ABC". Add IFERROR to handle cells without the character: =IFERROR(LEFT(A1, FIND("-", A1)-1), A1).
- Can LEFT work with numbers in Excel? LEFT treats numbers as text and returns text. =LEFT(12345, 2) returns "12" (as text, not the number 12). To get a number result, wrap in VALUE: =VALUE(LEFT(A1, 2)). Be careful with numbers that have leading zeros - they may be stored as text already. LEFT always returns a text result.
- How do I extract a variable number of characters with LEFT? Use FIND or SEARCH to determine the position dynamically. =LEFT(A1, FIND(" ", A1)-1) extracts the first word (characters before the first space). =LEFT(A1, FIND("@", A1)-1) extracts the username from an email. Combine with LEN for complex extractions: =LEFT(A1, LEN(A1)-4) removes the last 4 characters.
Editorial review
- Reviewed by Excel.Directory Editorial Team. Updated May 2026.
When to use LEFT
- Extracting area codes — common Text scenario for LEFT.
- Getting initials — common Text scenario for LEFT.
- Parsing codes — common Text scenario for LEFT.
LEFT in the Text category
- Browse all Text functions at /categories/text/ for related formulas.
- LEFT syntax: =LEFT(text, [num_chars])
- text (required): The text string to extract from
- num_chars (optional): Number of characters to extract (default 1)
- Confirm LEFT arguments match the syntax shown above before filling down.
- Lock table and range references with $ when copying formulas across rows or sheets.
Formula checklist before you copy down
- Confirm LEFT arguments match the syntax shown above before filling down.
- Lock table and range references with $ when copying formulas across rows or sheets.
- If results look wrong, check for text stored as numbers and invisible spaces with TRIM.
- Spot-check three known input rows manually against expected output.
Related Excel functions
- RIGHT (/functions/right/): Returns the specified number of characters from the end of a text string.
- MID (/functions/mid/): Returns a specific number of characters from a text string, starting at a specified position.
- LEN (/functions/len/): Returns the number of characters in a text string.
- FIND (/functions/find/): Finds one text string within another and returns the starting position (case-sensitive).
Comparisons involving this function
- LEFT vs MID vs RIGHT (/compare/left-vs-mid-vs-right/): Use LEFT, MID, and RIGHT for fixed-position extraction. Use TEXTBEFORE, TEXTAFTER, and TEXTSPLIT in modern Excel when values are separated by a delimiter.
- CONCAT vs TEXTJOIN (/compare/concat-vs-textjoin/): Use CONCAT for simple joining without a delimiter. Use TEXTJOIN when you need separators, optional blank skipping, and cleaner multi-cell joins.
Errors to watch for
- Returns empty if num_chars is 0 — review causes on linked error pages in the directory.
- #VALUE! if num_chars is negative — review causes on linked error pages in the directory.
Copy-paste audit workflow
- Enter LEFT on three test rows with known expected output documented on a QA tab.
- Fill down only after absolute references are locked on lookup tables and rate tables.
- Compare against manual calculation or a calculator for financial and statistical functions.
- Search this directory for comparison guides when choosing between similar functions in the same category.
LEFT worked examples to copy
- =LEFT("Hello World", 5) — Extract first 5 characters. Expected result: Hello.
- =LEFT(A1, 3) — Get first 3 characters from cell. Expected result: Hel.
LEFT reference summary for crawlers and offline review
- LEFT belongs to the Text category in Excel. Returns the specified number of characters from the start of a text string.
- Full syntax: =LEFT(text, [num_chars]). Open /functions/left/ for parameters, FAQs, and related pages.
- Common mistakes: Returns empty if num_chars is 0; #VALUE! if num_chars is negative
- Pair this function with comparison guides when another Excel formula might fit the same task better.
- Review fix-excel-formula-errors when unexpected errors appear after upgrading Excel or sharing across locales.