LEFT Function in Apple Numbers: Extract a Text Prefix
Learn the LEFT function for extracting text prefixes in Numbers with syntax, sample SKU data, formulas and troubleshooting.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Apple Numbers. How formula examples are checked
Quick answer: LEFT returns the first characters from the left side of a text value. Use =LEFT(A2,2) to extract the two-letter region at the beginning of a product code such as CA-2048-R1: the expected result is CA. If you omit the optional length, Apple shows that the first one character is returned.
Exact syntax and arguments
=LEFT(source-string, string-length)
| Argument | Required? | Apple-documented type and meaning |
|---|---|---|
source-string |
Yes | Any value whose leftmost characters are wanted. Numbers treats a numeric input as text for this result; Apple’s example LEFT(60,1) produces text 6. |
string-length |
No | Optional number specifying how many characters to return; Apple’s stated allowable length is at least 1. With this argument omitted, Apple’s example LEFT("abc") returns a. |
Apple says that a requested length greater than or equal to the input’s length returns the whole input string. Do not recommend LEFT(A2,0) as a supported way to produce an empty string: Apple’s version 15.4 parameter documentation requires the length to be 1 or greater. See the official LEFT reference.
Numbers version, platform and regional settings
The function’s current English documentation is in Apple Formulas and Functions Help 15.4, reviewed 2026-10-11. This is a documentation version, not proof that the formula first appeared in Numbers 15.4. Apple’s Functions Help welcome describes its use alongside iWork apps on Mac, iPhone, iPad and iCloud.com. The individual reference does not certify identical behavior on every older Numbers release or browser/device build. No Mac, iPhone, iPad, or iCloud Numbers session was executed for this guide. Where an older release matters, check its formula editor and retest the sample.
Examples below use references inside one Numbers table. Apple’s cell reference guide documents A2 and A2:A6 for the current table, and qualified forms such as Catalog::A2 or Sheet 2::Catalog::A2 for cells in other tables or sheets. Select the cell in the editor when unsure about the qualifier. Numbers is table-centric; don’t replace :: with an Excel worksheet !.
Apple’s syntax guide shows commas between arguments for locales that do not use a decimal comma. When the decimal separator is a comma, use semicolons between function arguments you type manually. This changes the delimiter, not the order or meaning of arguments. Formula names are case-insensitive when typed, although Apple shows them in uppercase.
Reproduce the sample in Numbers
Create a table named Catalog with one header row and these five text values. Enter the codes as text, not numeric cells, so the leading zero in row 4 survives import.
| Row | Column A — SKU (text) |
|---|---|
| 2 | CA-2048-R1 |
| 3 | US-7312-R2 |
| 4 | CA-0097-R3 |
| 5 | UK-6005-R1 |
| 6 | US-0120-R3 |
Put the formula into a free cell in column B of the same table and fill/copy down as indicated. The codes follow the documented example pattern two-letter region, hyphen, four-character identifier, hyphen, two-character revision. This is a teaching assumption, not a promise that real imported SKUs always follow that structure.
Worked example: extract region codes
In B2, enter:
=LEFT(A2,2)
Expected B2: CA. Fill the formula through B6 to obtain:
| Row | Formula target | Expected text |
|---|---|---|
| 2 | LEFT(A2,2) |
CA |
| 3 | LEFT(A3,2) |
US |
| 4 | LEFT(A4,2) |
CA |
| 5 | LEFT(A5,2) |
UK |
| 6 | LEFT(A6,2) |
US |
These are string extractions, not arithmetic operations: all rows use the same two-character prefix assumption. For a default-argument demonstration, =LEFT(A2) has expected output C, not CA.
Advanced example: regions with variable-length prefixes
If region labels can be one to several characters, a fixed 2 is fragile. For a code whose first hyphen marks the end of the region, use:
=LEFT(A2,FIND("-",A2)-1)
For CA-2048-R1, Apple FIND’s 1-based location of the first - is 3, so the requested prefix length is 3-1 = 2 and the expected result is CA. On the five supplied rows this also returns CA, US, CA, UK, US. If a code begins with a hyphen, the computed length would be zero, which does not satisfy LEFT’s documented length minimum; validate imported codes before applying this pattern. When no hyphen exists, FIND cannot supply a suitable boundary; use a separate validation or error-handling step rather than silently treating that data as valid.
For complex segments that may include hyphens inside their values, first standardize the source codes. Do not infer that any prefix is a country code without validating the meaning of the input data.
Errors, limitations and troubleshooting
- Too little or too much text: Check
string-length; omitted means one character, while a length beyond the whole string returns the whole string. - Unexpected empty or error result: Ensure the source reference actually contains text, that the argument is numeric and is at least 1, and that a required separator or code pattern exists before using a derived length.
- Wrong table:
A2uses the table containing the formula. ReferenceCatalog::A2only when necessary to disambiguate another table. - Lost leading zeros: Import the SKU as text. Converting
0097to the number97changes what a later string function sees; LEFT does not restore missing characters. - Imported spaces: LEFT counts characters where they appear, including leading spaces. An explicit cleanup with TRIM may be appropriate, but verify whether spaces in your identifiers have meaning before altering them.
Excel and Google Sheets comparison
Both Excel and Google Sheets also use LEFT(text,[num_chars]) to extract prefixes, but platform differences in out-of-range lengths and coercion should not be assumed equivalent. Numbers’ Apple-documented string-length ≥ 1 rule matters when porting a formula that passes 0. Numbers’ :: table qualifiers are not Excel’s Sheet!Cell reference syntax. Verify imported or localized formulas in each program rather than trusting similar names alone.
Related guides
- TEXTAFTER in Apple Numbers
- TEXTBETWEEN in Apple Numbers — extract text between separators. Present in that same snapshot.
- Apple MID reference — extract starting at a specified position.
- Apple FIND reference — locate the delimiter for variable-width text.
Official reference and verification
- Apple Numbers — function documentation
- Functions Help welcome
- cell reference guide
- syntax guide
- Apple MID reference
- Apple FIND reference
Verification status: Official documentation checked; example outcomes were independently reasoned or arithmetically checked where applicable. Not executed in Apple Numbers.
- No genuine Apple Numbers screenshots are included; this guide does not use mock application images.