如果这些行在一列中有重复值,我想合并/连接这些行。合并步骤适用于多列。下表显示了该问题的示例:
+-----+--------+--------+--------+--------+--------+----------+
| | A | B | C | D | E | F |
+-----+--------+--------+--------+--------+--------+----------+
| Dog | | | param1 | | | |
+-----+--------+--------+--------+--------+--------+----------+
| Dog | param2 | | | | | |
+-----+--------+--------+--------+--------+--------+----------+
| Dog | | | | | | |
+-----+--------+--------+--------+--------+--------+----------+
| Dog | | | | | | param3 |
+-----+--------+--------+--------+--------+--------+----------+
| Cat | | param5 | | | | |
+-----+--------+--------+--------+--------+--------+----------+
| Cat | | | | param6 | | |
+-----+--------+--------+--------+--------+--------+----------+
我有大约4000个唯一的行值和大约30个列。重复的行值的范围从n=1到n=10。
我喜欢的table:
+-----+--------+--------+--------+--------+--------+----------+
| | A | B | C | D | E | F |
+-----+--------+--------+--------+--------+--------+----------+
| Dog | param2 | | param1 | | | param3 |
+-----+--------+--------+--------+--------+--------+----------+
| Cat | | param5 | | param6 | | |
+-----+--------+--------+--------+--------+--------+----------+
这可以在Excel中用一些魔法完成吗?或者我需要像Python这样的高级工具吗?我已经尝试了多个公式,但没有成功。
先谢谢你
3条答案
按热度按时间ymzxtsji1#
这也可以使用Windows Excel 2010+和Excel 365(Windows或Mac)中提供的Power Query来完成
使用增强查询的步骤
Home => Advanced Editor
Applied Steps
以了解算法M代码
fwzugrvs2#
很棘手。一种方法是将
REDUCE()
嵌套在另一种方法中:A8
中的公式:或者,更动态一点:
iezvtpos3#
突出显示需要分组的值,然后转到数据,单击groe选项卡