TEXTBETWEEN Function in Apple Numbers: Examples and Syntax
TEXTBETWEEN in Apple Numbers: extract a ticket code inside brackets using practical sample data, clear expected results, pitfalls and the official function documentation.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: Extract a ticket code inside brackets. Ticket messages sometimes embed a reference such as [AB-204]. Rather than counting characters manually, return the text enclosed by the two delimiters.
This page covers the Apple Numbers implementation specifically. Its example values and expected results are original educational data, not screenshots or claims of a live application test.
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 for Numbers in that help version; it is not 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 TEXTBETWEEN reference. Documentation check; not a new native test.
Syntax and argument order
=TEXTBETWEEN(source-string, first-search-string, second-search-string, first-occurrence, second-occurrence)
The argument order above follows the official Apple Numbers documentation. Use the function name shown here, and replace placeholder arguments with ranges, cell references or criteria from your workbook.
Worked example with sample data
| Cell | Content |
|---|---|
| A2 | Order [AB-204] ready |
| A3 | Order [XY-019] delayed |
Enter this formula in a free result cell (outside the input range):
=TEXTBETWEEN(A2,"[","]")
Expected result: AB-204.
Why this result is correct: The first opening bracket and the following closing bracket define the capture area; the brackets themselves are excluded.
A second example or variation
=TEXTBETWEEN(A3,"[","]")
Expected result: XY-019.
A single formula can standardize several message formats as long as they use the same delimiters.
Common mistakes and troubleshooting
If a closing bracket is absent, extraction cannot succeed as written. Apple also offers occurrence arguments for strings with more than one bracketed field.
Also check that the version of Apple Numbers you use supports this function. A formula pasted from another application can fail because of different syntax, date interpretation, array behavior or regional separators. If the result differs, first compare the small dataset above with the expected answer before substituting your real data.
Where this function helps
Ticket messages sometimes embed a reference such as [AB-204]. Rather than counting characters manually, return the text enclosed by the two delimiters. Replacing the sample cells with your own ranges lets you reuse the same reasoning. On important spreadsheets, test with a few known rows, verify the final cell formatting and keep a separate copy of the source data.
Practical checks before reusing this formula
A missing opening or closing delimiter can change the outcome. Start by testing a string with exactly one clearly defined left and right boundary.
This function is suited to structured text fragments, not unrestricted HTML parsing or arbitrary nested delimiters.
To compare this function with other spreadsheet programs, use our eight-software function comparison. A missing guide does not mean a function is unsupported in another product; check its official documentation.
Official reference and verification
- Official Apple Numbers — TEXTBETWEEN reference
- Verification status: Official documentation checked; example outcome 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.