Textjoin in an array using a search string

mackensteff

Board Regular
Joined
Feb 9, 2010
Messages
74
Office Version
  1. 365
Platform
  1. MacOS
Hello,

I have being trying to use the new text join function in a formula with the criteria being to find a search string, and then joining cells that meet that criteria. In short the following is what I am hoping to accomplish when searching for "W" in the second column:

NameDayExpected Result
BobWBob, Sue, Jane, Jill
SueWF
Tim
JaneMWF
JackTR
JillMTWRF

<colgroup><col width="88" span="4" style="width: 66pt;"></colgroup><tbody>
</tbody>

The issue seems to be using search, or find or countif in an array formula to identify the cells for textjoin.

Anyone want to give it a go?

Thanks
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
The syntax for TEXTJOIN is as follows...

TEXTJOIN(delimiter, ignore_empty, text1, [text2], …)

<tbody>
</tbody>

Therefore, assuming that Columns A and B contain the data, try the following formula that needs to be confirmed with CONTROL+SHIFT+ENTER...

=TEXTJOIN(", ",TRUE,IF(ISNUMBER(SEARCH("W",B2:B7)),A2:A7,""))

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,215,062
Messages
6,122,923
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top