Using Excel TextJoin in conjunction with a Countif

2019-08-21 11:07发布

问题:

I would like to return a comma separated list of strings, based on a match within two tables, BUT with a conditional criteria.

Below you will see what I mean.

And my formulas: PlayerNames:

{=TEXTJOIN(", ",TRUE,IF(B4=teamRecs,playerNames,""))}

Players:

=COUNTIF(teamRecs,B4)

Signed:

=COUNTIFS(teamRecs,B4,K4:K13,"y")

My Issue is that I would like to return the list of PlayerNames, only if they have been signed. -- Is this possible in Excel?

回答1:

As per comment, you could try:

{=TEXTJOIN(", ",TRUE,IF(I4:I13=1, IF(J4:J13="y",H4:H13,""),""))}

Enter as array through CtrlShiftEnter

Shame I don't have TEXTJOIN myself to test it, even though I have Excel 2016 :(