Need to extract characters from the beginning of text? LEFT returns a specified number of characters from the left side of a text string. It’s essential for splitting data, extracting codes, and cleaning text.
What Makes LEFT Useful
LEFT extracts text from the start:
- Extract prefixes – Get area codes, product codes, or initials
- Split data – Separate combined fields like names or addresses
- Data cleaning – Remove unwanted characters from the end
- Code parsing – Pull identifiers from longer strings
- Format conversion – Extract parts of dates, IDs, or references
The Syntax
=LEFT(text, [num_chars])Text is your source string. Num_chars is how many characters to extract from the left. If omitted, returns just the first character.
Example 1: Extract Area Code
Get area codes from phone numbers:
| Phone Number |
|---|
| 555-123-4567 |
| 555-987-6543 |
| 555-456-7890 |
Formula: =LEFT(A2, 3)
Result in B2: 555
Takes the first 3 characters from the left.
Example 2: Product Category Codes
Extract category codes from product IDs:
| Product ID |
|---|
| ELC-12345 |
| FUR-98765 |
| ELC-54321 |
Formula: =LEFT(A2, 3)
Result in B2: ELC
Gets the first 3 characters (category code).
Example 3: Extract Year from Date String
Get year from dates formatted as text:
| Date String |
|---|
| 2025-01-15 |
| 2024-12-30 |
| 2025-03-22 |
Formula: =LEFT(A2, 4)
Result in B2: 2025
Extracts the first 4 characters (year).
Example 4: Get First Initial
Extract first initials from names:
| Name |
|---|
| Alice Cooper |
| Bob Dylan |
| Carol King |
Formula: =LEFT(A2, 1)
Result in B2: A
Returns just the first character.
Example 5: Variable Length Extraction
Extract text up to a delimiter:
| john.smith@company.com |
| sarah.j@business.org |
| mike@email.net |
Formula: =LEFT(A2, SEARCH("@", A2)-1)
Result in B2: john.smith
Finds @ symbol, extracts everything before it.
Example 6: Extract First Name
Get first names from full names:
| Full Name |
|---|
| John Smith |
| Sarah Johnson |
| Mike Williams |
Formula: =LEFT(A2, SEARCH(" ", A2)-1)
Result in B2: John
SEARCH finds the space, LEFT extracts everything before it.
LEFT vs Similar Functions
| Function | Extracts From | Example |
|---|---|---|
| LEFT | Start of text | LEFT(“Hello”, 3) = “Hel” |
| RIGHT | End of text | RIGHT(“Hello”, 2) = “lo” |
| MID | Middle of text | MID(“Hello”, 2, 3) = “ell” |
Common Use Cases
Name Splitting Separate first and last names from combined fields.
Code Extraction Pull prefixes or identifiers from longer codes.
Data Cleaning Extract relevant parts from messy imported data.
File Extensions Get file types from filenames (though RIGHT is better for this).
Practical Combinations
Extract before delimiter:
=LEFT(A2, SEARCH("-", A2)-1)First word only:
=LEFT(A2, SEARCH(" ", A2&" ")-1)Adding space handles single-word entries.
Remove last N characters:
=LEFT(A2, LEN(A2)-3)Removes 3 characters from the end.
Extract domain from URL:
=LEFT(A2, SEARCH("/", A2&"/")-1)Dynamic Extraction Length
Extract until specific character:
=LEFT(A2, FIND("@", A2)-1)Extract based on cell value:
=LEFT(A2, B2)B2 contains the number of characters.
Extract until first number:
=LEFT(A2, MIN(IFERROR(FIND({0,1,2,3,4,5,6,7,8,9}, A2), LEN(A2)+1))-1)Common Mistakes to Avoid
Number of Characters Too Large
- LEFT doesn’t error if num_chars exceeds text length
- Returns the entire text string
LEFT("Hi", 10)= “Hi”
Forgetting to Subtract 1
- When using SEARCH or FIND, subtract 1 to exclude delimiter
LEFT(A2, SEARCH("@", A2))includes @LEFT(A2, SEARCH("@", A2)-1)excludes @
Text vs Numbers
- LEFT returns text, even if extracting numbers
- “123” looks like 123 but is text
- Use VALUE to convert:
VALUE(LEFT(A2, 3))
Error Handling
Check for delimiter existence:
=IF(ISNUMBER(SEARCH("@", A2)), LEFT(A2, SEARCH("@", A2)-1), A2)Handle missing data:
=IFERROR(LEFT(A2, SEARCH(" ", A2)-1), A2)Ensure minimum length:
=IF(LEN(A2)>=3, LEFT(A2, 3), A2)Working with Numbers
Convert extracted text to number:
=VALUE(LEFT(A2, 3))Extract and calculate:
=VALUE(LEFT(A2, 4)) * 2Preserve leading zeros:
=TEXT(VALUE(LEFT(A2, 5)), "00000")Advanced Patterns
Extract multiple elements:
First: =LEFT(A2, SEARCH(" ", A2)-1)
Last: =RIGHT(A2, LEN(A2)-SEARCH(" ", A2))Extract before second delimiter:
=LEFT(A2, SEARCH("-", A2, SEARCH("-", A2)+1)-1)Case conversion while extracting:
=UPPER(LEFT(A2, 1))Gets first character in uppercase.
Tips for Using LEFT
Combine with TRIM Remove extra spaces before extracting:
=LEFT(TRIM(A2), 3)Use with SUBSTITUTE Replace characters before extracting:
=LEFT(SUBSTITUTE(A2, "-", ""), 5)Chain with other text functions LEFT + MID + RIGHT for complex parsing.
When to Use LEFT
Use LEFT when:
- Data starts with what you need
- Extracting fixed-length prefixes
- Splitting text at delimiters
- Getting first N characters
Don’t use LEFT when:
- You need the end of text (use RIGHT)
- You need middle characters (use MID)
- Extracting based on end position (use RIGHT)
Start Using It
Open a spreadsheet with text data. Pick a cell with text you want to split. Type =LEFT, specify the cell and how many characters. See the extracted text instantly.
LEFT becomes essential once you start working with combined text fields.
Questions about LEFT? Want to explore RIGHT and MID for complete text extraction? Let’s connect.

