在电子表格上组合类似数据 [英] Combining like data on a spreadsheet

查看:144
本文介绍了在电子表格上组合类似数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道如何创建一个宏(甚至是一个Access查询?),我正在看这里。我有一个电子表格数万个客户名称/数字与产品数据。如果客户已经购买了两种(或更多种)产品,它会在电子表格中反映出多个条目(如下面的示例)。

I'm not sure how I would go about creating a macro (or maybe even an Access query?) for what I'm looking at here. I Have a spreadsheet of tens of thousands of customer names/numbers with product data. If a customer has bought two (or more) products, it reflects as multiple entries on the spreadsheet (example below).


Name      #      Product
----------------------------
Bob      101    Product 1
Joe      102    Product 3
Bob      101    Product 2
Bob      101    Product 3
Hank     103    Product 2
Susan    104    Product 1
Hank     103    Product 3

我想在该电子表格上运行某些内容,将条目组合成一行,例如下面的示例。我不担心产品如何被描绘为逗号,换行,空间,无论如何。但我希望最终结果看起来像这样

I want to run something on that spreadsheet that combines the entries into one line, such as the example below. I'm not concerned about how the "products" are delineated... comma, line break, space, whatever. But I would like the end result to look something like this


Name      #      Products
-----------------------------------------------
Bob      101    Product 1, Product 2, Product 3
Joe      102    Product 3
Hank     103    Product 2, Product 3
Susan    104    Product 1

但是我甚至不知道从哪里开始。任何想法至少让我在正确的方向?

But I'm not even sure where to start. Any ideas to at least get me in the right direction?

推荐答案

c / code>和D2(?):

Sort on Product within Name and in D2 (?):

=IF(A1=A2,D1&", "&C2,C2)  

在E2中:

=A2<>A3.

同时复制,全选,复制,粘贴特殊,顶部的值,过滤器以选择 FALSE for ColumnE并删除所有可见。

Copy both down, select all, Copy, Paste Special, Values over the top, filter to select FALSE for ColumnE and delete all visible.

这篇关于在电子表格上组合类似数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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