Texts
Join, cut, search, replace, clean and format texts; read a field from a long text; regular expressions.
Texts come from Text, Long text, Status, Dropdown, Email, Phone and most other columns. A text written in the formula goes between double quotes: "Done".
Joining texts
| You write | Gives |
|---|---|
{item's First name} & " " & {item's Last name} |
Mario Rossi |
CONCAT({item's Code}, "-", {item's Year}) |
PRJ-2026 (CONCATENATE works too) |
TEXTJOIN(", ", TRUE, {item's City}, {item's Country}) |
The texts with a separator, empty ones skipped |
"Total: " & TEXT({item's Amount}, "#,##0.00") |
Total: 1,234.50 |
Cutting and measuring
| Function | Gives | Example |
|---|---|---|
LEFT(text, n) / RIGHT(text, n) |
The first / last n characters | LEFT("INV-2026-031", 3) → INV |
MID(text, start, n) |
n characters from position start (1 is the first) | MID("INV-2026-031", 5, 4) → 2026 |
LEN(text) |
How many characters | LEN("Padova") → 6 |
TEXT.BEFORE(text, delimiter, [n]) |
The text before the delimiter (the n-th one; negative from the end) coming soon | TEXT.BEFORE("[email protected]", "@") → mario |
TEXT.AFTER(text, delimiter, [n]) |
The text after it coming soon | TEXT.AFTER("[email protected]", "@") → acme.com |
TEXT.WORDS(text) / TEXT.LINES(text) |
The words / the lines, as a list coming soon | LIST.COUNT(TEXT.WORDS({item's Notes})) → number of words |
TEXT.INITIALS(text) |
The first letter of each word, in capitals coming soon | TEXT.INITIALS("Mario De Rossi") → MDR |
TEXT.BEFORE and TEXT.AFTER ignore upper and lower case and give an empty text when the delimiter isn’t there. The Excel versions TEXTBEFORE and TEXTAFTER work too.
Searching and replacing
| Function | Gives | Example |
|---|---|---|
FIND(what, text) |
The position of what, case-sensitive; a Wrong value error (#VALUE!) if missing |
FIND("-", "INV-031") → 4 |
SEARCH(what, text) |
The same, ignoring case | ISNUMBER(SEARCH("urgent", {item's Subject})) → TRUE if it contains “urgent” |
TEXT.REPLACE(text, find, with, [find, with]…) coming soon |
Every occurrence replaced, ignoring upper and lower case, several pairs at once; "" removes |
TEXT.REPLACE({item's Phone}, " ", "", "-", "") |
SUBSTITUTE(text, old, new, [n]) |
Every old replaced by new (or only the n-th) | SUBSTITUTE({item's Phone}, " ", "") |
REPLACE(text, start, n, new) |
n characters from start replaced | REPLACE("2026-031", 1, 4, "2027") → 2027-031 |
EXACT(a, b) |
TRUE if identical, upper and lower case included | EXACT({item's Code}, "ABC") |
Cleaning and changing case
| Function | Gives |
|---|---|
TRIM(text) |
The text without spaces at the ends and with single spaces inside |
UPPER(text) / LOWER(text) / PROPER(text) |
MARIO ROSSI / mario rossi / Mario Rossi |
REPT(text, n) |
The text repeated n times: REPT("★", {item's Rating}) |
CHAR(10) |
A line break, to join texts on separate lines in a Long text column |
UNICHAR(code) / UNICODE(text) |
The character with that Unicode number / the number of the first character: UNICHAR(9733) → ★, UNICODE("€") → 8364 |
Reading a field from a long text
Emails, forms and imports often put several fields in one Long text column:
Customer: ACME Srl
VAT: IT01234567890
City: Padova
TEXT.FIELD(text, label) gives the value after a label, ignoring upper and lower case and the colon coming soon:
=TEXT.FIELD({item's Request}, "VAT") → IT01234567890
Does the text contain or start with a word? coming soon
TEXT.CONTAINS(text, word, [word]…) is TRUE when any of the words is in the text, ignoring upper and lower case; the words can also be a list. With IFS it sorts texts by keywords without putting functions one inside the other:
=TEXT.CONTAINS({item's Notes}, "urgent", "asap") → TRUE
=IFS(TEXT.CONTAINS({item's Notes}, "urgent", "asap"), "High",
TEXT.CONTAINS({item's Notes}, "late"), "Medium", TRUE, "Normal")
TEXT.STARTS(text, word, [word]…) is TRUE when the text starts with one of the words, in the same way (leading spaces left out): TEXT.STARTS({item's Code}, "IT", "FR").
Chained it reads {item's Notes}.CONTAINS("urgent"), {item's Code}.STARTS("IT"). On a list made by a function (LIST.SPLIT(…).CONTAINS("Red")) the same .CONTAINS looks for a whole item instead, as LIST.CONTAINS; a column with several values counts as a text.
Taking numbers, emails, links and dates out of a text coming soon
An email, a request or a note often holds a number, an address or a date somewhere in the middle. These functions find them, with no patterns to write. Each one has a plural that gives all of them as a list, and a singular that gives the first one, or the one in the position you ask (negative from the end); empty when there is none.
| Function | Finds | Example |
|---|---|---|
TEXT.NUMBER(text, [n]), TEXT.NUMBERS(text) |
Numbers, written the European or the English way | TEXT.NUMBER("Total: € 1.250,50") → 1250.5 |
TEXT.EMAIL(text, [n]), TEXT.EMAILS(text) |
Email addresses | TEXT.EMAIL({item's Email body}) → [email protected] |
TEXT.LINK(text, [n]), TEXT.LINKS(text) |
Links starting with http, https or www. | TEXT.LINK("Details: https://acme.com/orders/31.") → https://acme.com/orders/31 |
TEXT.PHONE(text, [n]), TEXT.PHONES(text) |
Phone numbers, as written | TEXT.PHONE("tel. +39 049 123 4567") → +39 049 123 4567 |
TEXT.DATE(text, [n]), TEXT.DATES(text) |
Dates, ready for a Date column | TEXT.DATE("Delivery 5 dicembre 2026") → 2026-12-05 |
TEXT.DIGITS(text) |
The digits alone | TEXT.DIGITS("INV-2026-031") → 2026031 |
=SUM(TEXT.NUMBERS({item's Notes})) → the total of the numbers in the notes
=TEXT.DATE({item's Email body}) + 30 → 30 days after the first date in the email
=TEXT.NUMBER({item's Subject}, -1) → the last number in the subject
Numbers: in 1.250,50 and 1,250.50 the last separator is the decimal point; a single dot or comma followed by three digits groups thousands (3.500 is 3500, 0.125 stays 0.125). Phone numbers have 8 to 15 digits (7 after + or 00), so a long order number can be taken for one. Dates: 2026-11-09, 09/11/2026 and 9.11.26 (day first, unless the second number can’t be a month: 11/25/2026), 9 November 2026, November 9, 2026, with month names in English, Italian, Spanish, French and German; without a year, this year.
Numbers and dates as text
| Function | Gives | Example |
|---|---|---|
TEXT(value, format) |
A number or date written with a format | TEXT(1234.5, "#,##0.00") → 1,234.50, TEXT({item's Date}, "DD/MM/YYYY") |
FIXED(number, [decimals], [no commas]) |
A number with fixed decimals | FIXED(3.14159, 2) → 3.14 |
DOLLAR(number, [decimals]) |
A number as dollars, with thousands commas | DOLLAR(1234.5) → $1,234.50 |
VALUE(text) |
The number in a text | VALUE("42") → 42 |
For dates, DATE.FORMAT also writes month and day names in your language: see Dates.
Regular expressions
Regular expressions find text by its pattern: an email address, an order number, a VAT number.
| Function | Gives | Example |
|---|---|---|
REGEXEXTRACT(text, pattern) |
The first part that matches, or the part in brackets; a Not found error (#N/A) if nothing matches |
REGEXEXTRACT({item's Subject}, "Order #(\d+)") → 4521 |
REGEXREPLACE(text, pattern, replacement) |
Every match replaced; $1, $2 are the parts in brackets |
REGEXREPLACE({item's Name}, "(\w+) (\w+)", "$2 $1") → Rossi Mario |
REGEXMATCH(text, pattern) |
TRUE if the text matches | REGEXMATCH({item's VAT}, "^IT\d{11}$") |
=REGEXEXTRACT({item's Email body}, "[\w.+-]+@[\w-]+\.[\w.]+") → the first email address in the text
A pattern that isn’t valid gives a Wrong value error (#VALUE!). Patterns are limited to 500 characters and texts to 50,000.
Step by step coming soon
Every text function can follow the text with a dot:
={item's Request}.FIELD("Customer").TRIM().UPPER()
={item's Name}.INITIALS()
A function given a list works on each of its items: UPPER(LIST.SPLIT({item's Tags})) gives every tag in capitals.