SheetsLessons
Text function

LEFT function in Google Sheets

LEFT returns a set number of characters from the start of a text string. Use it to grab prefixes, codes and first names.

Syntax

=LEFT(string, [number_of_characters])
string
The text to extract from.
number_of_characters
Optional. How many characters to take (default 1).

Practice LEFT

Task 1 of 2

Extract the 3-letter category code from the start of the SKU in A2. Answer in B2.

B2
fx

Tip: while typing a formula, click a cell or drag across cells to insert references. Press Enter to check, and Tab to accept a function suggestion.

LEFT examples

Each example below runs against this sample sheet. The results are calculated by the same engine as the practice grid.

ABC
1Raw nameSKUNote
2  maya   PATEL ELC-0427-NYRefund requested
3leo rossiFUR-1180-TXShipped
4AVA KIMOFC-0093-CARefund issued
Messy imported data
FormulaResultWhat it shows
=LEFT(B2, 3)ELCCategory code from a SKU.
=LEFT(C2, 6)RefundFirst six characters.
=LEFT(A3, FIND(" ", A3) - 1)leoFirst name: everything before the first space.

Tips and common mistakes

  • The result is always text, even if it looks like a number. Wrap in VALUE to convert.
  • Pair with FIND or SEARCH when the length varies from row to row.

Related functions