LEFT Function
The Excel LEFT function extracts a specified number of characters from the beginning of text. If the character count is omitted it returns one character, and an overlong request returns all available text.
| Excel LEFT Function | |||||||
| LEFT extracts a chosen number of characters from the beginning of text. | |||||||
| Text scenarios, editable | LEFT examples | ||||||
| Scenario | Source text | Characters | Data note | Example | Formula syntax | Result | |
| Region code | EMEA-4821 | 4 | Leading segment | Region code | =LEFT(B12,C12) | EMEA | |
| First initial | Avery | 1 | Single character | First initial | =LEFT(B13,C13) | A | |
| Document prefix | INV-2026-041 | 3 | Before first hyphen | Document prefix | =LEFT(B14,C14) | INV | |
| Full text | North | 5 | Exact text length | Full text | =LEFT(B15,C15) | North | |
| Overlong request | OK | 5 | Returns available text | Overlong request | =LEFT(B16,C16) | OK | |
| How LEFT behaves | |||||||
| LEFT starts at the first character and moves right for the requested count. | |||||||
| If num_chars equals the text length, the complete text is returned. | |||||||
| If num_chars exceeds the text length, LEFT returns all available characters without an error. | |||||||
| Reliability checks | |||||||
| Region-code example returns the expected four-character prefix | OK | ||||||
| Overlong request returns all available source text | OK | ||||||
Overview
The Excel LEFT function extracts characters from the beginning of a text value. It is most useful when the required prefix occupies a stable number of character positions.
Quick reference
Syntax: =LEFT(text, [num_chars])
Returns: One or more leading characters as text. (text)
Arguments:
text(required) — The text value or cell reference from which to extract characters.num_chars(optional) — The number of characters to return from the left; defaults to 1 when omitted.
The bracketed num_chars argument is optional and defaults to 1. It must be zero or greater, and it controls how many characters are returned from the start of the text.
Common uses
- Extract fixed region, department, or product-code prefixes.
- Return initials from consistently structured names.
- Read a known number of leading characters from identifiers.
- Classify records using a stable beginning segment.
Calculations
LEFT begins with the first character in text and returns the requested number of characters. Positions are counted one character at a time, including spaces and punctuation.
When num_chars is omitted, Excel returns the first character. A count equal to the source length returns the complete string. A larger count also returns all available text rather than padding the result.
The result is text, even when the extracted characters look numeric. LEFT does not search for a delimiter; a fixed count becomes unreliable when the prefix length varies between rows.
Function behavior
Situation | Behavior |
|---|---|
| Returns the first character. |
Count equals text length | Returns the entire text. |
Count exceeds text length | Returns all available text. |
Spaces and punctuation | Count as characters. |
Numeric-looking result | Returned as text. |
Negative count | Returns |
Common errors
Using LEFT when prefix lengths vary
What happens:
Some rows return part of the desired prefix or include unwanted delimiter characters.
Better approach:
Use delimiter-aware search and extraction logic when the boundary moves.
Forgetting that spaces count
What happens:
Leading or embedded spaces consume character positions and shift the visible result.
Better approach:
Clean unexpected whitespace or deliberately include it in the character count.
Expecting a numeric result
What happens:
Extracted digits behave as text in later arithmetic.
Better approach:
Convert the result with VALUE only when the extracted text is guaranteed to represent a valid number.
Example
Example 1 — Extract a Region Code
=LEFT(B12,C12)
The source is EMEA-4821, and the requested count is 4. The result is EMEA.
Example 2 — Return the First Character
=LEFT(B13,C13)
With source text Avery and a count of 1, the formula returns the initial A.
Example 3 — Extract a Document Prefix
=LEFT(B14,C14)
The first three characters of INV-2026-041 are INV.
Example workbook
The workbook contains LEFT Example and Notes tabs. Five live examples cover a region code, initial, document prefix, exact-length request, and overlong request. Two checks confirm the region prefix and overlong behavior.
Key takeaway
Use LEFT for stable, fixed-length prefixes; switch to delimiter-aware logic when the boundary can move.