Excel - Textjoin
Excel - Textjoin
function, is proving to be more flexible and more SUPPORT FOR ARRAY FORMULAS
powerful than it originally appeared. When Array formulas are a powerful class of
formulas in Excel. These formulas can
TEXTJOIN was introduced in 2017, it seemed like Microsoft perform a calculation over several
was trying to improve deficiencies in the CONCATENATE cells in a range and then return the
results to another function. While
function. But there’s more to it. array formulas are powerful, they
don’t work with most Excel functions.
They certainly never worked with
BY BILL JELEN CONCATENATE.
While Excel Help doesn’t reveal it,
the TEXTJOIN function does support
an array as the third argument. This
In the past, if you wanted to concate- allows you to do some interesting cal-
nate a list of names in column A, you culations inside of TEXTJOIN. Say that
couldn’t use a simple formula such as you wanted to retrieve a list of people
=CONCATENATE(A1:A26). Instead, you who RSVP’d “Yes” to an event.
had to specify each cell individually: In Figure 2, column A contains the
=CONCATENATE(A1,A2,A3,A4,A5,…A26). names. Column B contains “Yes” or
Unless the values stored in column A “No” for RSVP. You want to find all of
happened to have trailing spaces, you the people who have a RSVP value of
would end up with a hard-to-read re- Yes. The array portion of the formula
sult like AndyBettyCharlieDaleEddy. is IF(B2:B26=“Yes”,A2:A26,“”). In English,
See more figures TEXTJOIN offers some improve- this formula says, “If column B says
in the online ments over CONCATENATE. The Yes, then return the name in column
version at: syntax of TEXTJOIN is =TEXTJOIN A; otherwise return an empty text.”
(Delimiter, Ignore_Empty, Text1, The consecutive quotation marks (“”)
[Text2],…). Here’s how it works: indicate an empty value.
Using this array formula as the
l The first argument lets you third argument to TEXTJOIN sends
specify a delimiter to appear be- Andy, Betty, “”, Dale, Eddy, “”, Gloria to the
tween each value. For example, TEXTJOIN function. If you specify
including “, ” would make sure TRUE for the Ignore_Empty argu-
that the names appear with a ment, Excel will return Andy, Betty,
comma and space between Dale, Eddy, Gloria.
them: Andy, Betty, Charlie, Dale, Like most array formulas, you
Eddy. (See Figure 1.) have to use a special shortcut key.
l In the second argument, you can Type =TEXTJOIN(“, ”,TRUE,IF(B2:B26=“Yes”,