Filter Function need to *** TextJoin to it

Stephen_IV

Well-known Member
Joined
Mar 17, 2003
Messages
1,177
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I have a filter function that I would like to add Textjoin to make 1 formula. Can someone please help me with this. Thanks in advance!

SPED BIL REG Class Breakdown FIlter.xlsm
ABCDEFGHIJKLMN
1SCHOOLIDGRADE_LEVELSCHOOLFIRST_NAMELAST_NAMETYPEFIRST_NAMELAST_NAMETYPEGRADE
21502115WashingtonSusanDDDREGULAR_EDSPEDHumeraFFFSPED-SUBSTITUTE0,1,2
31502113WashingtonKathleenEEEREGULAR_ED150211TiffanyPPPSPED-INTEGRATED-ASD1,2
41502110WashingtonHumeraFFFSPED-SUBSTITUTE
51502110WashingtonHumeraFFFSPED-SUBSTITUTE
61502111WashingtonHumeraFFFSPED-SUBSTITUTE
71502112WashingtonHumeraFFFSPED-SUBSTITUTE
81502112WashingtonKathleenFFGREGULAR_ED
91502111WashingtonLauraGGGREGULAR_ED
101502111WashingtonSusanGGOREGULAR_ED
111502116WashingtonJoshuaLLLREGULAR_ED
121502113WashingtonJacquelineMMMREGULAR_ED
13150211-1WashingtonRosanneMMMREGULAR_ED
141502110WashingtonShannonNNNREGULAR_ED
151502115WashingtonDawnOOOREGULAR_ED
161502114WashingtonRoccoPACREGULAR_ED
171502111WashingtonTiffanyPPPSPED-INTEGRATED-ASD
181502111WashingtonTiffanyPPPSPED-INTEGRATED-ASD
191502112WashingtonTiffanyPPPSPED-INTEGRATED-ASD
201502114WashingtonHillarySSSREGULAR_ED
211502116WashingtonGabrieleTTTREGULAR_ED
221502111WashingtonDinaVVVREGULAR_ED
23150211-1WashingtonHeatherYYYREGULAR_ED
Sheet3 (2)
Cell Formulas
RangeFormula
K2:M3K2=UNIQUE(FILTER(D2:F23,--ISNUMBER(SEARCH(J2,$F$2:$F$23))*($A$2:$A$23=J3)))
N2:N3N2=TEXTJOIN(",",1,UNIQUE(IF((D2:D23=K2)*(E2:E23=L2),B2:B23,"")))
Dynamic array formulas.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Closest I can get. Seems to do what I want.

VBA Code:
=VSTACK({"Name","Type","Grade"},LET(
    f,FILTER(D2:D870 & " " & E2:E870, (--ISNUMBER(SEARCH(M2,$F$2:$F$870))*($A$2:$A$870=M3))*(A2:A870 = M3)),
    u,UNIQUE(f),
    h,BYROW(u,LAMBDA(x,TEXTJOIN(", ",TRUE,UNIQUE(FILTER(F2:F870,(D2:D870 & " " & E2:E870)=x))))),
    g,BYROW(u,LAMBDA(x,TEXTJOIN(", ",TRUE,UNIQUE(FILTER(B2:B870,(D2:D870 & " " & E2:E870)=x))))),
    SORT(HSTACK(u,h,g))
))
 
Upvote 0
That isn't a valid formula for me. In any case, what about this one?

24 01 14.xlsm
ABDEFIJKLMN
1SCHOOLIDGRADE_LEVELFIRST_NAMELAST_NAMETYPEFIRST_NAMELAST_NAMETYPEGRADE
21502115SusanDDDREGULAR_EDSPEDHumeraFFFSPED-SUBSTITUTE0,1,2
31502113KathleenEEEREGULAR_ED150211TiffanyPPPSPED-INTEGRATED-ASD1,2
41502110HumeraFFFSPED-SUBSTITUTE
51502110HumeraFFFSPED-SUBSTITUTE
61502111HumeraFFFSPED-SUBSTITUTE
71502112HumeraFFFSPED-SUBSTITUTE
81502112KathleenFFGREGULAR_ED
91502111LauraGGGREGULAR_ED
101502111SusanGGOREGULAR_ED
111502116JoshuaLLLREGULAR_ED
121502113JacquelineMMMREGULAR_ED
13150211-1RosanneMMMREGULAR_ED
141502110ShannonNNNREGULAR_ED
151502115DawnOOOREGULAR_ED
161502114RoccoPACREGULAR_ED
171502111TiffanyPPPSPED-INTEGRATED-ASD
181502111TiffanyPPPSPED-INTEGRATED-ASD
191502112TiffanyPPPSPED-INTEGRATED-ASD
201502114HillarySSSREGULAR_ED
211502116GabrieleTTTREGULAR_ED
221502111DinaVVVREGULAR_ED
23150211-1HeatherYYYREGULAR_ED
Sheet2 (3)
Cell Formulas
RangeFormula
K2:N3K2=LET(u,UNIQUE(FILTER(D2:F23,ISNUMBER(SEARCH(J2,F2:F23))*(A2:A23=J3))),HSTACK(u,BYROW(u,LAMBDA(r,TEXTJOIN(",",1,UNIQUE(IF((D2:D23=INDEX(r,1,1))*(E2:E23=INDEX(r,1,2)),B2:B23,"")))))))
Dynamic array formulas.
 
Upvote 0
Thank you Peter_SSs. That formula is perfect. Thank you again!
 
Upvote 0
You are welcome. Thanks for the confirmation. :)
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,623
Latest member
Techenthusiast

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