LEFT: pull a code out of an ID

Lesson 23 of 54

LEFT returns a number of characters from the start of a text. RIGHT does the same from the end, and MID from the middle.

Each SKU starts with a 3-letter category code. In cell B2, write a formula that extracts the first 3 characters of A2.

B2
AB
1SKUCategory
2KIT-2041
3BTH-0177
4GAR-3310

Type in the formula bar above and press Enter to check.

Skip

How LEFT works

Syntax

=LEFT(text, number_of_characters)
text
The cell to take characters from.
number_of_characters
How many characters to return. Leave it out to get just the first one.

Example

Full names are in A2 ("Maria Lopez") and you want everything before the space.

=LEFT(A2, FIND(" ", A2) - 1)

FIND locates the space, so LEFT returns "Maria" whatever the name's length.

Common mistakes

  • Getting a number back as text. =LEFT("2026-03", 4) is the text "2026"; wrap it in VALUE() to calculate with it.
  • Hard-coding a length when the parts vary. Combine with FIND or SEARCH to cut at a character.

Questions people ask

How do I get the text after a character?

Use MID with FIND: =MID(A2, FIND(" ", A2) + 1, 100), or TEXTAFTER in Excel 365.

Practice it above: type the formula in the formula bar and press Enter to check.