如何在Google表格中根据条件返回唯一值,但将行合并并用逗号分隔?

huangapple go评论75阅读模式
英文:

How to return unique values on criteria basis but rows concatenated and separated by comma in Google Sheets?

问题

I'm tryng to get this to work, but I keep getting the error:
=ARRAYFORMULA(TEXTJOIN(", ";FALSE;IF(A22:A32=A2:A10;K22:K32;"")))
Array arguments to EQ are of different size

Here is the file with the data, attempt and the expected result:
https://docs.google.com/spreadsheets/d/1gh5w0czg2JuoA3i5wPu8_eOpC4Q4TXIRhmUrg53nKMU/edit?usp=sharing

英文:

I'm tryng to get this to work, but I keep getting the error:
=ARRAYFORMULA(TEXTJOIN(", ";FALSE;IF(A22:A32=A2:A10;K22:K32;"")))
Array arguments to EQ are of different size

Here is the file with the data, attempt and the expected result:
https://docs.google.com/spreadsheets/d/1gh5w0czg2JuoA3i5wPu8_eOpC4Q4TXIRhmUrg53nKMU/edit?usp=sharing

答案1

得分: 1

=map(A2:A19;lambda(Σ;join(", ", unique(filter(K22:K;A22:A=Σ)))))

如何在Google表格中根据条件返回唯一值,但将行合并并用逗号分隔?

英文:

You may try:

=map(A2:A19;lambda(Σ;join(", ";unique(filter(K22:K;A22:A=Σ)))))

如何在Google表格中根据条件返回唯一值,但将行合并并用逗号分隔?

huangapple
  • 本文由 发表于 2023年3月31日 03:26:32
  • 转载请务必保留本文链接:https://go.coder-hub.com/75892235.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定