X
Excel Zero to Hero Interactive Learning Platform
0%
text

LEFT Function

beginner

LEFT Function

🎯Purpose

Returns the first character or characters in a text string, based on the number of characters you specify.

Syntax

EXCEL
=LEFT(text, [num_chars])

Arguments Breakdown

Argument Required? Description
text Required The text string that contains the characters you want to extract.
num_chars Optional The number of characters to extract from the left side (defaults to 1 if omitted).

Practical Examples

1. Extract Leading Initials Drill

From Formulas_&_Functions_Part_1.xlsx: If A1 contains "Mostafa ":

EXCEL
=LEFT(A1, 3)

Result: "Mos".

2. Extract Category Prefix from SKU

In Superstore dataset: Order ID = "CA-2016-152156"

EXCEL
=LEFT([@[Order ID]], 2)

Result: "CA".

3. Dynamic First Name Extraction

EXCEL
=LEFT(A2, SEARCH(" ", A2) - 1)

Behavior Rules

  • num_chars must be $\ge 0$. If negative, returns #VALUE!.
  • If num_chars is greater than LEN(text), LEFT returns the entire string.

Related Knowledge

← Back to Formula Library