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

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

问题描述

我正在尝试将索引匹配中的多个结果合并到一个单元格中.这是我正在使用的示例数据集:

我想要的结果:

如您所见,我正在尝试查找数据为 2017 年 4 月 12 日的所有客户.然后我想将它们组合成另一个单元格中的一个字符串.如果日期相同,我已经弄清楚如何总结数量,但就是无法弄清楚如何连接客户.

解决方案

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

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

如果您的 Excel 版本不支持 TEXTJOIN,请在此站点中搜索 [excel][textjoin] 以获取替代方案.示例:

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

My desired results:

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.

解决方案

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

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

If your Excel version does not support TEXTJOIN, search this site for [excel][textjoin] for alternatives. Example: TEXTJOIN for xl2010/xl2013 with criteria

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

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