问题
I'm having trouble getting this to work. Basically, I have the following set of data:
In the TextJoin Formula column, I want it to do a look up against the adjacent ID, scan the income code column and concat the income codes pertaining to that unique ID, separated by a ','.
Many thanks
回答1:
use:
=TEXTJOIN(",",TRUE,IF($A$2:$A$6=$A2,$B$2:$B$6,""))
Depending on one's version this may require Ctrl-Shift-Enter instead of Enter when exiting edit mode.
If one has the Dynamic Array Formula FILTER:
=TEXTJOIN(",",,FILTER(B:B,A:A=A2))
来源:https://stackoverflow.com/questions/60286878/textjoin-using-a-unique-id-how-do-i-concat-multiple-values