Using Jext Join and Match to find and join all cells excluding blanks

Sparkee

New Member
Joined
Aug 24, 2017
Messages
10
Office Version
  1. 365
Platform
  1. Windows
I am using TextJoin and Match to find all text in a cell that matches a reference criteria to create a single list for each reference. The formula is working great, however, it is including zero values and I would like to remove the zeros. Each time I try I break the formula, can someone please give me a hand?

Here is the formula: =TEXTJOIN(",",TRUE,IF(FREQUENCY(IF($D$2:$D1000=$D$2,MATCH(IF($D$2:$D$1000=$D$2,$E$2:$E$1000),IF($D$2:$D$1000=$D$2,$E$2:$E$1000),0)),ROW($D$2:$D$1000)-ROW($D$2)+1)>0,$E$2:$E$1000,""))

Thank you, Michelle


Last NameFirst NameSuburbRef NumberTypeSpecialtyText Join Field for TypeText Joint for Specialty
JonesBarry
111111​
GeneralGeneral0
JacksonMichael
222222​
GeneralGeneral,Specialist0,Clowning
JacksonMichael
222222​
GeneralGeneral,Specialist0,Clowning
JacksonMichael
222222​
GeneralGeneral,Specialist0,Clowning
JacksonMichael
222222​
SpecialistClowningGeneral,Specialist0,Clowning
JohnElton
333333​
GeneralGeneral,Specialist0,Clowning,Juggling
JohnElton
333333​
GeneralGeneral,Specialist0,Clowning,Juggling
JohnElton
333333​
GeneralGeneral,Specialist0,Clowning,Juggling
JohnElton
333333​
SpecialistClowningGeneral,Specialist0,Clowning,Juggling
JohnElton
333333​
SpecialistJugglingGeneral,Specialist0,Clowning,Juggling
 
Last edited:

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Do you have Microsoft 365 and as such access to the new dynamic array functions including the filter function ?
If so you could use this:-
Excel Formula:
=TEXTJOIN(",",TRUE,TRANSPOSE(UNIQUE(FILTER($F$2:$F$1000,($D$2:$D$1000=D7)*($F$2:$F$1000<>""),""))))

Note: Your code uses column E but based on you inserted image I have assumed it should be the Specialty column which seems to be column F.

My result based on your sample data is below:

20210225 TextJoin Filter.xlsx
ABCDEFGHI
1Last NameFirst NameSuburbRef NumberTypeSpecialtyText Join Field for TypeText Joint for SpecialtyMY TextJoin Filter version
2JonesBarry111111GeneralGeneral0 
3JacksonMichael222222GeneralGeneral,Specialist0,ClowningClowning
4JacksonMichael222222GeneralGeneral,Specialist0,ClowningClowning
5JacksonMichael222222GeneralGeneral,Specialist0,ClowningClowning
6JacksonMichael222222SpecialistClowningGeneral,Specialist0,ClowningClowning
7JohnElton333333GeneralGeneral,Specialist0,Clowning,JugglingClowning,Juggling
8JohnElton333333GeneralGeneral,Specialist0,Clowning,JugglingClowning,Juggling
9JohnElton333333GeneralGeneral,Specialist0,Clowning,JugglingClowning,Juggling
10JohnElton333333SpecialistClowningGeneral,Specialist0,Clowning,JugglingClowning,Juggling
11JohnElton333333SpecialistJugglingGeneral,Specialist0,Clowning,JugglingClowning,Juggling
12JohnElton333333SpecialistJugglingGeneral,Specialist0,Clowning,JugglingClowning,Juggling
Sheet1
Cell Formulas
RangeFormula
I2:I12I2=TEXTJOIN(",",TRUE,TRANSPOSE(UNIQUE(FILTER($F$2:$F$1000,($D$2:$D$1000=D2)*($F$2:$F$1000<>""),""))))
 
Upvote 0
Another option
+Fluff 1.xlsm
ABCDEFGH
1Last NameFirst NameSuburbRef NumberTypeSpecialtyText Join Field for TypeText Joint for Specialty
2JonesBarry111111GeneralGeneral 
3JacksonMichael222222GeneralGeneral,SpecialistClowning
4JacksonMichael222222GeneralGeneral,SpecialistClowning
5JacksonMichael222222GeneralGeneral,SpecialistClowning
6JacksonMichael222222SpecialistClowningGeneral,SpecialistClowning
7JohnElton333333GeneralGeneral,SpecialistClowning,Juggling
8JohnElton333333GeneralGeneral,SpecialistClowning,Juggling
9JohnElton333333GeneralGeneral,SpecialistClowning,Juggling
10JohnElton333333SpecialistClowningGeneral,SpecialistClowning,Juggling
11JohnElton333333SpecialistJugglingGeneral,SpecialistClowning,Juggling
Detailed_view
Cell Formulas
RangeFormula
G2:H11G2=TEXTJOIN(",",,UNIQUE(FILTER(E$2:E$11,$D$2:$D$11=$D2,"")))
 
Upvote 0
Solution

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

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