The LEFT function extracts a specified number of characters from the left side of a text string. This guide explains how LEFT works and includes practical examples you can use immediately.

WHAT THE LEFT FUNCTION DOES

LEFT pulls characters from the beginning of a text string, making it ideal for extracting prefixes, area codes, product categories, or any fixed-length identifier that appears at the start of text. It's commonly used for parsing structured data or cleaning up imported text.

WHEN TO USE LEFT
  • You want to extract area codes from phone numbers
  • You need to get the first few characters of product codes or IDs
  • You're separating first names from full names
  • You want to extract prefixes or abbreviations from text
FORMULA SYNTAX
LEFT(text, num_chars)
ArgumentDescription
textThe text string from which you want to extract characters
num_charsNumber of characters to extract from the left
EXAMPLE 1: EXTRACT AREA CODES FROM PHONE NUMBERS

We want to get the 3-digit area code from phone numbers.

AB
1Phone NumberArea Code
2415-555-1234=LEFT(A2,3)
3212-555-9876=LEFT(A3,3)
4310-555-4567=LEFT(A4,3)
=LEFT(A2, 3)

Result: 415, 212, 310 (first 3 characters from each phone number)

Need help applying this? Try this in Numstro Builder

EXAMPLE 2: EXTRACT PRODUCT CATEGORY FROM SKUS

We want to get the 2-letter product category from SKU codes.

AB
1SKUCategory
2EL12345=LEFT(A2,2)
3CL98765=LEFT(A3,2)
4SH54321=LEFT(A4,2)
=LEFT(A2, 2)

Result: EL (Electronics), CL (Clothing), SH (Shoes)

Need help applying this? Try this in Numstro Builder

COMMON MISTAKES & EDGE CASES
  • If num_chars exceeds the text length, LEFT returns the entire string
  • If num_chars is 0, LEFT returns an empty string
  • Negative num_chars will cause a #VALUE! error
  • LEFT counts spaces and special characters as characters
  • Use TRIM first if you need to remove extra spaces
RELATED FUNCTIONS
  • RIGHT — extract characters from the right side
  • MID — extract characters from the middle
  • LEN — get the total length of text
  • FIND — locate specific characters for dynamic extraction
FURTHER READING

Official Microsoft documentation:
LEFT — Microsoft Support