The LEFT function in Excel allows you to extract a specific number of characters starting from the beginning (left side) of a text string. ✂️ For example, =LEFT(A1, 5) will return the first five characters from the cell A1. Whether you’re handling product codes, names, dates, or file prefixes, the LEFT function is perfect for data cleaning, formatting, and text manipulation. 💡 It works smoothly across Windows, macOS, and Ubuntu platforms with helpful shortcuts to speed up your workflow.
🧠 What Is the LEFT Function in Excel?
The LEFT function returns the first characters of a string, based on the number you specify.
Syntax:
=LEFT(text, [num_chars])
text: The original string or cell reference (like"Excel"orA2)num_chars: Optional. The number of characters to extract from the left (defaults to 1 if omitted)
✅ Quick Examples of LEFT Function
| Formula | Result | What It Does |
|---|---|---|
=LEFT("Excel", 2) | Ex | Returns first 2 characters |
=LEFT(A1, 4) | 2023 | Pulls year from “2023-08-12” |
=LEFT(B2, LEN(B2)-3) | Removes last 3 characters | |
=LEFT("Invoice-1023", FIND("-", "Invoice-1023")-1) | Invoice | Extracts everything before the hyphen |
💼 Why Use LEFT in Excel?
The LEFT function helps you:
- Extract prefixes, first names, or codes
- Trim out parts of text like tags or labels
- Clean up improperly formatted data
- Build dynamic formulas for text-based automation
- Preprocess data before applying filters or logic
⌨️ Keyboard Shortcuts for Using LEFT Function
| Action | Windows | macOS | Ubuntu (LibreOffice Calc) |
|---|---|---|---|
| Start a formula | = | = | = |
| Insert function dialog | Shift + F3 | Shift + F3 | Ctrl + F2 |
| Confirm formula | Enter | Return | Enter |
| Expand formula bar | Ctrl + Shift + U | Cmd + Shift + U | Ctrl + Shift + U |
💡 Pro Tip: Press Ctrl + A after typing =LEFT( to open the argument helper.
🧩 Combine LEFT with Other Excel Functions
- LEFT + FIND: Get text before a specific character
=LEFT(A1, FIND("-", A1)-1) - LEFT + LEN: Remove trailing characters dynamically
=LEFT(A1, LEN(A1)-2) - LEFT + VALUE: Convert extracted numbers to usable values
=VALUE(LEFT(B1, 4)) - LEFT + IF: Create condition-based extractions
=IF(LEFT(A1,1)="A","Group A","Other")
📊 Real-World Use Cases for LEFT Function
| Use Case | Formula | Result |
|---|---|---|
| Extract year from date text | =LEFT(A1,4) | 2024 |
| Get prefix from product ID | =LEFT(A2,3) | SKU |
| Pull first name | =LEFT(A2,FIND(" ",A2)-1) | John |
| Trim file names | =LEFT(A1,LEN(A1)-4) | Removes .csv extension |
🐧 LEFT Function in Ubuntu/Linux (LibreOffice Calc)
LibreOffice Calc supports the LEFT function the same way:
=LEFT(A1, 5)
- Works with both text and numbers
- Use
Ctrl + F2to open the Function Wizard - Found under: Text Functions
LibreOffice also supports combining LEFT() with FIND() or LEN() for advanced string manipulation.
🚫 Common Mistakes with LEFT
- ❌ Forgetting to specify
num_chars—defaults to 1 - ❌ Using
LEFT()on numbers not stored as text (unexpected behavior) - ❌ Extracting more characters than the string contains (returns full string)
- ❌ Assuming case sensitivity—
LEFT()is not case-sensitive - ❌ Not handling
FIND()errors withIFERROR()when working with delimiters
✅ Use IFERROR() for cleaner results:
=IFERROR(LEFT(A1, FIND("-", A1)-1), "")
FAQs
What does the LEFT function do in Excel?
It extracts a specific number of characters from the beginning (left side) of a text string.
What’s the default behavior if I skip num_chars?
Excel returns the first character only.
Can I use LEFT on numbers?
Yes, but ensure the number is treated as text, or wrap it in TEXT().
How does LEFT differ from RIGHT?LEFT() pulls characters from the start of the string; RIGHT() pulls from the end.
Is LEFT case-sensitive?
No. It does not distinguish between uppercase or lowercase characters.
Does LEFT work in Google Sheets and LibreOffice?
Yes, it’s fully supported across both platforms.
✅ Final Thoughts on Excel LEFT Function
The LEFT function in Excel is an essential tool for string extraction, data cleaning, and formatting. 🧼 Whether you’re splitting first names, grabbing prefixes, or simplifying entries, it saves time and reduces manual errors.
Pair LEFT() with other functions like LEN(), FIND(), and IF() to build smart, dynamic formulas that adapt to your data—across Windows, macOS, and Ubuntu. 🔁📈
Complete List of Windows Keyboard Shortcuts
If you need help for Windows, you can find a whole list of all keyboard shortcuts here.
https://keyboard-shortcuts.org/
Advertisment
