Anyone have the new TEXTJOIN function?
Will it accept conditional array arguments?
=TEXTJOIN(",",TRUE,IF(A1:A5="Yes",B1:B5))
I assume that would have to be array entered.
Anyone have the new TEXTJOIN function?
Will it accept conditional array arguments?
=TEXTJOIN(",",TRUE,IF(A1:A5="Yes",B1:B5))
I assume that would have to be array entered.
Biff
Microsoft MVP Excel
Keep It Simple Stupid
Let's Go Pens. We Want The Cup.
Yes Tony. This would be the correct syntax for the array entry.
=TEXTJOIN(",",TRUE,IF(A1:A5="Yes",B1:B5,""))
Here are some more examples with use of TEXTJOIN and CONCAT functions
v B C D 1 City State 2 Albany NY Albany, Buffalo, New York 3 Atlanta GA Atlanta, Macon, Duluth 4 Miami FL Miami, Tampa, Orlando 5 San Francisco CA San Francisco, Modesto 6 Buffalo VA Richmond, Norfolk, Winchester 7 Richmond 8 Macon 9 Duluth 10 Norfolk 11 New York 12 Tampa 13 Orlando 14 Modesto 15 Winchester
CONCAT function (array entry)
Formula:
=MID(CONCAT(IF(A$2:A$15=C2,", "&B$2:B$15,"")),3,8^5)
TEXTJOIN
Formula:
=TEXTJOIN(", ",1,IF(A$2:A$15=C2,B$2:B$15,""))
Non-array versions
Formula:
=TEXTJOIN(", ",1,INDEX(REPT(B$2:B$15,A$2:A$15=C2),0))
Formula:
=MID(CONCAT(INDEX(REPT(", "&B$2:B$15,A$2:A$15=C2),0)),3,8^5)
Last edited by AlKey; 08-13-2016 at 05:19 PM.
If you like my answer please click on * Add Reputation
Don't forget to mark threads as "Solved" if your problem has been resolved
"Nothing is so firmly believed as what we least know."
--Michel de Montaigne
If this was the data...
Data Range
A B 1 No Tom 2 Yes Sue 3 No Karen 4 Yes Tracy 5 No Biff
And I used this array formula:
=TEXTJOIN(",",TRUE,IF(A1:A5="Yes",B1:B5))
What result do we get?
In the IF function I have not defined a value_if_false argument so it defaults to FALSE.
Does the TEXTJOIN function ignore those values or would we have to use something like:
=TEXTJOIN(",",TRUE,IF(A1:A5="Yes",B1:B5,""))
The formula you used will result in FALSE,Sue,FALSE,Tracy,FALSE
With this: =MID(CONCAT(IF(A1:A5="Yes",", "&B1:B5,"")),3,8^5)
you get: Sue, Tracy
I meant with this: =TEXTJOIN(", ",1,IF(A1:A5="Yes",B1:B5,""))
Thanks for the info!![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks