Foxcolab
Skip to content

Text functions in Sheets: join, extract and clean text

Join names with & and TEXTJOIN, pull parts out of text with LEFT, MID and FIND, tidy imports with TRIM and PROPER, and format numbers and dates with TEXT in Foxcolab Sheets.

Updated 3 min read

In short

Text functions in Foxcolab Sheets join, extract and tidy text. Join with &, CONCAT or TEXTJOIN(", ", TRUE, A2:A4). Extract with LEFT, RIGHT and MID, and find positions with FIND (case-sensitive) or SEARCH. Clean up with TRIM, CLEAN, PROPER, UPPER, LOWER and SUBSTITUTE. TEXT(D2, "d mmm yyyy") turns a date or number into formatted text, and VALUE turns text back into a number.

Key takeaways

  • & joins any two values: =A2&" "&B2. CONCAT joins ranges, and TEXTJOIN puts a separator between values and can skip blanks.
  • LEFT, RIGHT and MID take characters by position. Combine them with FIND or SEARCH to cut text at a character such as @.
  • TRIM removes extra spaces, CLEAN removes line breaks, and PROPER, UPPER and LOWER fix capital letters.
  • Joining a date shows its serial number. Wrap it in TEXT with a format code, such as TEXT(D2, "d mmm yyyy").
  • Text functions return text. Wrap a result in VALUE before you do sums with it.

Last reviewed 5 December 2026

Text functions in Foxcolab Sheets join, extract and tidy up text, so you can build full names, pull the domain out of an email address or fix an imported list in a few formulas. Sheets calculates every formula in your browser, so your spreadsheet stays end-to-end encrypted while you work.

The examples use this contact list:

ABCD
1First nameLast nameEmailJoined
2ashaMEHTAasha.mehta@example.com14 Apr 2026
3ravikumarravi.k@example.com2 May 2026
4Singhj.singh@example.com9 May 2026

Use a text function#

  1. Click an empty cell

    For example, E2.

  2. Type the formula

    Type =PROPER(A2&" "&B2). Sheets shows a hint with each argument as you type.

  3. Press Enter

    The cell shows Asha Mehta. Drag the fill handle down to do the same for every row.

To browse the full list, click Functions in the toolbar and choose All functions…, or choose Insert → Function.

Join text#

Text
=A2&" "&B2                      → asha MEHTA
=CONCAT(A2:B2)                  → ashaMEHTA
=CONCATENATE(A3, " ", B3)       → ravi kumar
=TEXTJOIN(", ", TRUE, A2:A4)    → asha, ravi
=TEXTJOIN(", ", FALSE, A2:A4)   → asha, ravi,

The & operator joins any two values. CONCAT also accepts ranges. TEXTJOIN puts a separator between values, and its second argument decides what happens to blank cells: TRUE skips them, FALSE keeps them and leaves a stray separator, as the last line shows.

Pull out part of the text#

LEFT and RIGHT take characters from the start or end, and MID takes them from any position. On their own they need a fixed count. Paired with FIND or SEARCH, which return the position of a character, they can cut at the right place in every row:

Text
=LEN(C2)                               → 22
=LEFT(C2, FIND("@", C2) - 1)           → asha.mehta
=MID(C2, FIND("@", C2) + 1, 100)       → example.com
=RIGHT("INV-2026-0042", 4)             → 0042
=REPT("*", 6)&RIGHT("9876543210", 4)   → ******3210

FIND matches capital letters exactly. SEARCH ignores them and accepts * and ? wildcards:

Text
=SEARCH("mehta", C2)                   → 6
=FIND("Mehta", C2)                     → #VALUE!
=IFERROR(FIND("Mehta", C2), "No match") → No match

For splitting at a separator, TEXTBEFORE, TEXTAFTER and TEXTSPLIT are shorter. See Split text to columns in Sheets.

Clean up imported text#

Text
=TRIM("  Dana   Lee ")                  → Dana Lee
=PROPER(B2)                             → Mehta
=UPPER(B3)                              → KUMAR
=LOWER(B2)                              → mehta
=SUBSTITUTE("98765 43210", " ", "")     → 9876543210
=EXACT("Asha", "asha")                  → FALSE

TRIM removes spaces at both ends and squeezes runs of spaces to one. CLEAN removes line breaks and other invisible characters. SUBSTITUTE replaces every copy of one piece of text, or only the copy you number in its fourth argument.

To clean a column in place rather than with formulas, select it and choose Data → Data cleanup → Trim whitespace, or use find and replace.

Format numbers and dates as text#

Text
="Joined "&D2                           → Joined 46126
="Joined "&TEXT(D2, "d mmm yyyy")       → Joined 14 Apr 2026
=TEXT(1250000, "#,##,##0")              → 12,50,000
=TEXT(1250000, "#,##0")                 → 1,250,000
=TEXT(0.256, "0.0%")                    → 25.6%

Sheets stores a date as a number, so joining one shows that number. TEXT applies a format code first. The code #,##,##0 groups digits in lakhs and crores, and #,##0 in threes.

Common mistakes#

  • Doing sums with text. Text functions return text, even when it looks like a number. =RIGHT("INV-2026-0042", 4) gives the text 0042. Wrap it in VALUE to get the number 42: =VALUE(RIGHT("INV-2026-0042", 4)).
  • A space TRIM won't remove. Text from web pages often has non-breaking spaces. Use =TRIM(SUBSTITUTE(A2, CHAR(160), " ")).
  • PROPER and apostrophes. PROPER capitalizes every letter after a non-letter, so it's becomes It'S. It's right for names such as O'Brien but check the results for other text.
  • Very long results. A text result longer than 32,767 characters shows #VALUE!.
  • Semicolons instead of commas. If your spreadsheet's locale writes decimals with a comma, separate arguments with ;. Check Tools → Calculation & locale settings….

Frequently asked questions

What's the difference between CONCAT, CONCATENATE and TEXTJOIN?

CONCATENATE joins the pieces you list one by one. CONCAT does the same but also accepts ranges, so =CONCAT(A2:B2) joins two cells. TEXTJOIN adds a separator between each value and can skip empty cells, which makes it the best choice for lists.

Why does my joined date show a number like 46126?

Sheets stores dates as serial numbers and shows them as dates only through the cell's format. When you join a date with & or TEXTJOIN, the number comes through. Use TEXT to pick the format, as in ="Joined "&TEXT(D2, "d mmm yyyy").

Why doesn't TRIM remove a space I can see?

Text copied from web pages often contains non-breaking spaces, which TRIM leaves alone. Replace them with ordinary spaces first, as in =TRIM(SUBSTITUTE(A2, CHAR(160), " ")).

How do I show a number with lakh and crore commas?

Use the format code "#,##,##0", as in =TEXT(1250000, "#,##,##0"), which gives 12,50,000. The code "#,##0" groups in threes and gives 1,250,000.

Did this answer your question?

One click, no account needed.

Still need help?

Our support team can take it from here.

Jump to