Category: FUNCTION | Updated: 2026-11-22

How to Use the LEFT Function in Google Sheets | Extract Characters from the Start of Text

How to Use the LEFT Function

The LEFT function extracts a specified number of characters from the start (left side) of a text string. It is widely used for tasks like pulling the first 3 digits of a postal code or the prefix of a product code.

Syntax

=LEFT(string, [number_of_characters])
  • string: The source text string or cell reference to extract from (required).
  • number_of_characters: The number of characters to extract from the start as a positive integer (optional). If omitted, it defaults to 1 (the first character only).

Example Using a Table

Here is an example of extracting the 3-character category code from the start of each product code below.

Row Column A (Product Code) Column B (Result: Category)
1 Product Code Category
2 LAP-2026-001 =LEFT(A2, 3) → LAP
3 MON-2026-045 =LEFT(A3, 3) → MON
4 KEY-2026-112 =LEFT(A4, 3) → KEY
  • Formula: =LEFT(A2, 3)
  • Result: LAP

If you omit the character count and write =LEFT(A2), it returns only the first character, L.

Common Errors and Notes

  • Negative Character Count Causes #VALUE!: Specifying a negative number (e.g., -1) for the second argument results in a #VALUE! error. Specifying 0 returns an empty string "".
  • Extracting from Dates Returns Serial Numbers: Using LEFT directly on a date cell (e.g., 2026/11/22) extracts characters from its internal serial number (such as 46348). Convert the date to text first using TEXT(A2, "yyyy/mm/dd") if you want to extract the year or month as text.
  • Watch Out for Leading Spaces: Any leading half-width or full-width space in a cell is counted as the first character. Combining with TRIM (e.g., =LEFT(TRIM(A2), 3)) helps prevent unintended offsets.

Frequently Asked Questions

Q. How does the LEFT function count full-width and half-width characters?

A. Both full-width characters (such as kanji, hiragana, and katakana) and half-width characters (such as letters, numbers, and symbols) are counted equally as 1 character each.

Q. How can I use digits extracted by LEFT in numeric calculations?

A. Because LEFT returns a text string, functions like SUM will ignore it. Prepend "--" to the formula or wrap it in VALUE (e.g., =VALUE(LEFT(A2, 3))) to convert it to a number.