1. Home
  2. Functions
  3. Text
  4. TEXTJOIN

TEXTJOIN function

Joins texts and ranges with a delimiter between them, optionally skipping empty values.

Syntax

=TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)

Arguments

ArgumentRequiredDescription
delimiterRequiredText to put between the values (a range or array of delimiters is used in turn)
ignore_emptyRequiredTRUE to skip empty values
text1RequiredA text, value or range
text2OptionalMore texts, values or ranges

How to use TEXTJOIN

TEXTJOIN takes 3 required arguments and 1 optional argument, and accepts more values in the same pattern. Type =TEXTJOIN( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=TEXTJOIN(", ", TRUE, "a", "", "b")Result "a, b"
=TEXTJOIN("-", FALSE, "a", "", "b")Result "a--b"
=TEXTJOIN(" ", TRUE, {"The","sun";"will","rise"})Result "The sun will rise"

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.