从索引匹配连接多个结果 [英] Concatenate multiple results from an index match

查看:126
本文介绍了从索引匹配连接多个结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将索引匹配中的多个结果并入一个单元格。以下是我正在使用的示例数据集:

I'm trying to concat multiple results from an index match into one cell. Here is an example data set I'm working with:

我想要的结果:

正如你所看到的,我试图找到数据是4/12/2017的所有客户。然后我想将它们组合成另一个单元格中的一个字符串。如果日期相同,我已经弄清楚如何总结数量,但是无法弄清楚如何连接客户。

As you can see, I'm trying to find all customers where the data is 4/12/2017. I then want to combine them into one string in another cell. I've figured out how to sum up the quantity if the date is the same, but just can't figure out how to concatenate the customer.

推荐答案

使用较新的TEXTJOIN函数作为CSE的数组公式。

Use the newer TEXTJOIN function as an array formula with CSE.

=textjoin("|", true, if(a2:a10=date(2017, 4, 12), c2:c10, text(,)))

如果您的Excel版本不支持TEXTJOIN,请在本网站搜索[excel] [textjoin]作为替代方案。

If your Excel version does not support TEXTJOIN, search this site for [excel][textjoin] for alternatives.

这篇关于从索引匹配连接多个结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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