Contact

LEFT Function in Apple Numbers: Extract a Text Prefix

Text Beginner Apple Numbers

Learn the LEFT function for extracting text prefixes in Numbers with syntax, sample SKU data, formulas and troubleshooting.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

LEFT returns text from the beginning of a value. In the SKU CA-2048-R1, =LEFT(A2,2) extracts CA. If the optional length is omitted, the documented example returns the first one character.

Availability and version history

  • Introduced: Documented in Apple’s Formulas and Functions Help 15.4; the original introduction release is not established.
  • Availability: Currently documented in Apple’s Formulas and Functions Help 15.4 edition; this is not a Numbers app version or a final supported-version endpoint.
  • Scope: Shared iWork function help. Availability in individual clients and older releases is not established by this check.
  • Checked: October 14, 2026, against the official LEFT reference. Official documentation and independent string checks; no native Numbers execution.

Syntax and supported lengths

LEFT(source-string, string-length)

The source is required and can be any value. The optional length is numeric and must be at least 1. A length at least as large as the source returns the entire string. These rules come from Apple’s LEFT reference.

Apple also demonstrates a numeric source: LEFT(60,1) returns text 6. That explicit example does not establish how every custom-formatted number, date or imported value is converted. LEFT(A2,0) is outside the documented length range and is not used as an empty-string technique here.

Set up the original SKU example

Create Catalog, a Numbers table with seven columns A:G and six rows, including one header row. Set A2:A6 to Text and enter the following codes without enclosing quotation characters. Keep the original table unchanged when trying later scenarios.

Row A — SKU
2 CA-2048-R1
3 US-7312-R2
4 CA-0097-R3
5 UK-6005-R1
6 US-0120-R3

These codes have a two-letter prefix, a four-character identifier and a two-character revision, separated by hyphens. That is an explicit input convention, not a rule imposed by the function. Keeping the entire code as text preserves 0097 and 0120 for later extraction.

Extract fixed prefixes and compare the default

Enter these formulas in row 2, then fill B2:E2 through row 6:

Column Formula Purpose
B =LEFT(A2,2) two-character region
C =LEFT(A2) default one-character result
D =LEFT(A2,FIND("-",A2)-1) prefix bounded by the first hyphen
E =LEN(B2) extracted length

B2:B6 and D2:D6 both contain CA, US, CA, UK, US. C2:C6 contain C, U, C, U, U. E2:E6 are all 2. The fixed and delimiter-based methods agree because this original fixture consistently uses two-letter prefixes.

In F2 enter =ISTEXT(B2) and fill through F6 for TRUE. These are labels rather than quantities. In G2 enter =B2=D2 and fill through G6 for TRUE, checking agreement between the two extraction methods without altering A.

Reproduce Apple’s literal examples

Create PrefixControls, with four columns and five rows. Enter these formulas in A2:A4 respectively:

  • =LEFT("one two three",2) returns on.
  • =LEFT("abc") returns a.
  • =LEFT(60,1) returns text 6.

B2 =ISTEXT(A2) filled through B4 is TRUE for all three results. In C2 enter =LEFT("Catalog",20) for Catalog; D2 =LEN(C2) gives 7. Requesting twenty characters does not pad the seven-character source.

Advanced: prefixes of genuinely different lengths

Create RegionLabels, with six columns and five rows. Put C-7-R1, GLOBAL-0097-R2, CA-2048-R1 and US-0120-R3 in A2:A5 as text.

In B2 enter =FIND("-",A2), C2 =B2-1, D2 =LEFT(A2,C2), E2 =LEFT(A2,2) and F2 =LEN(D2). Fill B2:F2 through row 5.

Row First hyphen B Length C/F Delimited prefix D Fixed two characters E
2 2 1 C C-
3 7 6 GLOBAL GL
4 3 2 CA CA
5 3 2 US US

The formula from the original worksheet, =LEFT(A2,FIND("-",A2)-1), is the same operation without helper columns. The delimiter positions now prove why a constant length of two is insufficient.

A code beginning with a hyphen would calculate length zero. A code with no hyphen has no boundary to find. Neither is a valid input to this stated pattern; resolve those records before bulk extraction rather than assuming the function validates them.

A matching prefix is only one part of validation

Create PrefixBoundary, with four columns and six rows. Enter CA-2048-R1, CAB-2048-R1, CA2048-R1, CA-ABCD-R1 and ** CA-2048-R1** in A2:A6. The last entry begins with one actual space.

B2 =LEFT(A2,2) filled through B6 gives CA, CA, CA, CA, then a space followed by C. C2 =LEFT(A2,3) filled through C6 gives CA-, CAB, CA2, CA-, then a space followed by CA.

In D2 enter =IF(C2="CA-","Prefix boundary matches","Check prefix") and fill through D6. Only rows 2 and 5 match. Row 5 still contains the alphabetic identifier ABCD, demonstrating that checking the prefix and delimiter does not establish the validity of the remaining fields.

Use FIND to locate a boundary, MID for an internal segment and RIGHT for an ending. TEXTAFTER and TEXTBETWEEN address delimiter-based questions under their own argument rules.

A leading space is a real character, not automatically an error. Removing it may be appropriate for a controlled import, but decide whether whitespace is meaningful before changing identifiers. A lost leading zero in the original input cannot be recovered by extracting characters that are no longer present.

Input boundaries and portability

The exercises use ordinary ASCII identifiers with explicitly positioned spaces. Apple’s LEN reference counts graphemes, including spaces and special characters. Do not replace that contract with a byte count or extrapolate these examples to every Unicode sequence.

The references are local to the table containing each formula. English examples use commas between arguments; Apple’s syntax guidance specifies semicolons when the decimal separator is a comma. Similar function names in other spreadsheet programs do not establish identical argument bounds, error labels, imports or reference notation.

Exact error presentation, fractional arguments, empty inputs and custom-formatted numeric conversions beyond Apple’s explicit examples remain unverified. Preserve meaningful spaces and leading zeros rather than applying cleanup or numeric conversion automatically.