Textjoin:使用唯一ID,如何合并多个值? [英] Textjoin: Using a unique ID, how do I concat multiple values?

查看:503
本文介绍了Textjoin:使用唯一ID,如何合并多个值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很难使它正常工作.基本上,我有以下数据集:

I'm having trouble getting this to work. Basically, I have the following set of data:

在TextJoin公式列中,我希望它对相邻的ID进行查找,扫描收入代码列,并合并与该唯一ID相关的收入代码,并用','分隔.

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 ','.

非常感谢

推荐答案

使用:

=TEXTJOIN(",",TRUE,IF($A$2:$A$6=$A2,$B$2:$B$6,""))

根据版本不同,退出编辑模式时可能需要按Ctrl-Shift-Enter而不是Enter.

Depending on one's version this may require Ctrl-Shift-Enter instead of Enter when exiting edit mode.

如果具有动态数组公式FILTER:

If one has the Dynamic Array Formula FILTER:

=TEXTJOIN(",",,FILTER(B:B,A:A=A2))

这篇关于Textjoin:使用唯一ID,如何合并多个值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆