TEXTJOIN (Delimiter, IgnoreBlank, FirstTextParameter, OtherTextParameters..., Locale?) TEXTJOIN (Delimiter; IgnoreBlank; FirstTextParameter; OtherTextParameters...; Locale?)

Delimiter

The text string that appears between the values that are joined together.

IgnoreBlank

Logical Logical

Whether blank values and empty text strings are ignored.

FirstTextParameter

The first parameter denoting a single value or an array of values.

OtherTextParameters

Additional parameters denoting single values or arrays of values.

Locale

Locale Locale (optional)

The locale to use when doing number conversions.

A locale represents a language and possibly a region. If omitted, the configured locale is used.

Use a value such as Locale.EnglishLocale,English to provide a locale (the full list is below). If your chosen locale is not part of the list, use the LOCALE function instead.

All locales may not be available. If a locale is not available, a fallback locale can be used. To provide such fallback locales, use the LOCALE function.

The LOCALE function accepts so-called Unicode Locale Identifiers. Every value in the list below corresponds to such an identifier.

Supported locales
Formula Unicode Locale Identifier Description
Locale.ArabicLocale,Arabic ar Arabic
Locale.BulgarianLocale,Bulgarian bg Bulgarian
Locale.ChineseCnLocale,ChineseCn zh-CN Chinese (simplified), as used in mainland China
Locale.ChineseTwLocale,ChineseTw zh-TW Chinese (traditional), as used in Taiwan
Locale.CroatianLocale,Croatian hr Croatian
Locale.CzechLocale,Czech cs Czech
Locale.DanishLocale,Danish da Danish
Locale.DutchLocale,Dutch nl Dutch
Locale.DutchBeLocale,DutchBe nl-BE Dutch, as used in Belgium
Locale.EnglishLocale,English en English
Locale.EnglishAuLocale,EnglishAu en-AU English, as used in Australia
Locale.EnglishCaLocale,EnglishCa en-CA English, as used in Canada
Locale.EnglishInLocale,EnglishIn en-IN English, as used in India
Locale.EnglishNzLocale,EnglishNz en-NZ English, as used in New Zealand
Locale.EnglishUkLocale,EnglishUk en-GB English, as used in the United Kingdom
Locale.EnglishUsLocale,EnglishUs en-US English, as used in the United States of America
Locale.EnglishZaLocale,EnglishZa en-ZA English, as used in South Africa
Locale.FinnishLocale,Finnish fi Finnish
Locale.FrenchLocale,French fr French
Locale.FrenchBeLocale,FrenchBe fr-BE French, as used in Belgium
Locale.FrenchCaLocale,FrenchCa fr-CA French, as used in Canada
Locale.FrenchChLocale,FrenchCh fr-CH French, as used in Switzerland
Locale.GermanLocale,German de German
Locale.GermanAtLocale,GermanAt de-AT German, as used in Austria
Locale.GermanChLocale,GermanCh de-CH German, as used in Switzerland
Locale.GreekLocale,Greek el Greek
Locale.HebrewLocale,Hebrew he Hebrew
Locale.HindiLocale,Hindi hi Hindi
Locale.HungarianLocale,Hungarian hu Hungarian
Locale.IndonesianLocale,Indonesian id Indonesian
Locale.ItalianLocale,Italian it Italian
Locale.ItalianChLocale,ItalianCh it-CH Italian, as used in Switzerland
Locale.JapaneseLocale,Japanese ja Japanese
Locale.KoreanLocale,Korean ko Korean
Locale.NorwegianLocale,Norwegian nb Norwegian (bokmål)
Locale.PersianLocale,Persian fa Persian
Locale.PolishLocale,Polish pl Polish
Locale.PortugueseLocale,Portuguese pt Portuguese
Locale.PortugueseBrLocale,PortugueseBr pt-BR Portuguese, as used in Brazil
Locale.RomanianLocale,Romanian ro Romanian
Locale.RussianLocale,Russian ru Russian
Locale.SlovakLocale,Slovak sk Slovak
Locale.SpanishLocale,Spanish es Spanish
Locale.SpanishArLocale,SpanishAr es-AR Spanish, as used in Argentina
Locale.SpanishEsLocale,SpanishEs es-ES Spanish, as used in Spain
Locale.SpanishMxLocale,SpanishMx es-MX Spanish, as used in Mexico
Locale.SwedishLocale,Swedish sv Swedish
Locale.ThaiLocale,Thai th Thai
Locale.TurkishLocale,Turkish tr Turkish
Locale.UkrainianLocale,Ukrainian uk Ukrainian
Locale.VietnameseLocale,Vietnamese vi Vietnamese

Returns

Text Text

A text string incorporating all the given values, joined together with the given delimiter.

Joins a number of values together, separating them with a delimiter, and returns the resulting text string. TEXTJOIN (", ", FALSE, "a", "b", "c") TEXTJOIN (", "; FALSE; "a"; "b"; "c") returns "a, b, c".

The second parameter determines if blank values and empty text strings should be part of the returned text string. The remaining parameters are the values that should be joined together. Use any combination of regular values and arrays of values.

Converting numbers to text strings

If a number is given as a parameter, it is converted to a text string:

TEXTJOIN (" — ", FALSE, 1234.56, 9876.54)
TEXTJOIN (" — "; FALSE; 1234,56; 9876,54)

This formula returns a value such as "1234.56 — 9876.54", using the decimal separator of the configured locale. If that locale is German, for instance, "1234,56 — 9876,54" is returned instead. Thousands separators are not used.

Determining how numbers are converted to text

To get a formatted value where you determine how the numbers are formatted, use any of these functions:

Colors, logical values and blank values

Colors are converted to CSS color values, such as "#00ff00ff" for green with no transparency. The logical value FALSE is converted to "FALSE" and TRUE is converted to "TRUE". Blank values (including those produced by the BLANK function) are converted to "" .

TEXTJOIN and arrays

The values to join together can be arrays, and even arrays of arrays. All their elements are joined together. This formula returns "a, b, c, d":

TEXTJOIN (", ", FALSE, { { "a", "b" }, { "c", "d" } })
TEXTJOIN (", "; FALSE; { { "a"; "b" }; { "c"; "d" } })

If the delimiter is an array, TEXTJOIN is invoked once per delimiter and the results are collected as an array. This formula returns the array { "a, b, c", "a; b; c" }{ "a, b, c"; "a; b; c" }:

TEXTJOIN ({ ", ", "; " }, FALSE, { "a", "b", "c" })
TEXTJOIN ({ ", "; "; " }; FALSE; { "a"; "b"; "c" })

Unlike some spreadsheets, TEXTJOIN does not cycle through an array of delimiters, using a different delimiter between each pair of values.

Examples

TEXTJOIN (", ", FALSE, "a", "b", "c")
TEXTJOIN (", "; FALSE; "a"; "b"; "c")

Returns "a, b, c".

TEXTJOIN (", ", FALSE, { "a", "b", "c" })
TEXTJOIN (", "; FALSE; { "a"; "b"; "c" })

Returns "a, b, c".

TEXTJOIN (", ", FALSE, { { "a", "b" }, { "c", "d" } })
TEXTJOIN (", "; FALSE; { { "a"; "b" }; { "c"; "d" } })

Returns "a, b, c, d".

TEXTJOIN ({ ", ", "; " }, FALSE, { "a", "b", "c" })
TEXTJOIN ({ ", "; "; " }; FALSE; { "a"; "b"; "c" })

Returns the array { "a, b, c", "a; b; c" }{ "a, b, c"; "a; b; c" }.

TEXTJOIN (", ", FALSE, BLANK (), "a", "b", BLANK (), "c")
TEXTJOIN (", "; FALSE; BLANK (); "a"; "b"; BLANK (); "c")

Returns ", a, b, , c". The second parameter, FALSE, instructs TEXTJOIN not to ignore blank text strings.

TEXTJOIN (", ", TRUE, BLANK (), "a", "b", BLANK (), "c")
TEXTJOIN (", "; TRUE; BLANK (); "a"; "b"; BLANK (); "c")

Returns "a, b, c". The second parameter, TRUE, instructs TEXTJOIN to ignore blank text strings.

TEXTJOIN ("", FALSE, { "a", "b", "c" })
TEXTJOIN (""; FALSE; { "a"; "b"; "c" })

Returns "abc". The first parameter, "" , specifies that no delimiter between the array elements should be used when joining them together.

TEXTJOIN ("", FALSE, UNICHAR ( SEQUENCE (26, 65)))
TEXTJOIN (""; FALSE; UNICHAR ( SEQUENCE (26; 65)))

Returns a text string containing all the upper-case letters of the English alphabet, "ABC...". SEQUENCE returns an array of size 26, starting at 65 ( { 65, 66, 67, ... }{ 65; 66; 67; ... }). When UNICHAR is given an array, it is invoked once for every array element, and the results are collected together in an array. TEXTJOIN then joins these array elements together in a single text string (where the first parameter, "" , specifies that no delimiter between the array elements should be used).

fxEngine Shell Want this in your own terminal? A standalone version is coming. Get notified.
Loading fxEngine Shell