Google电子表格 - 连接或连接多个行中具有匹配值的行中的文本 [英] Google Spreadsheets - Join or Concatenate text from multiple rows that have matching values in one of the columns

查看:86
本文介绍了Google电子表格 - 连接或连接多个行中具有匹配值的行中的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所说,我需要连接或连接多个行中具有匹配值的列中的文本。 (使用最新的Firefox,Widows 7)。



在Sheet1中,我有一张表,看起来像这样(抱歉,看起来很乱 - 我不知道该怎么做整洁的SO表):

David | 1 |蓝色
史蒂夫| 1 |绿色

James | 2 |

Chris | 1 |

史蒂夫| 3 |蓝色
杰克| 1 |

Ben | 1 |

James | 1 |

Jack | 2 |黄色

乔治| 4 |



在Sheet2中,我想要一张如下所示的表格:



David | 1 |蓝色
史蒂夫| 4 |绿色&蓝色
James | 3 |

Chris | 1 |

Jack | 3 |黄色
本| 1 |

George | 4 |
b
$ b

A列显示唯一值(名称),B列显示该名称的总和。



我已成功生成列A和B,但我很难生成第三列,该列应返回'Green&蓝'为史蒂夫和'黄'为杰克等。



有谁知道如何做到这一点?



我用以下公式生成Sheet2列A和B:

列A:= UNIQUE(Sheet1! A:A)

Column B:= SUMIF(Sheet1!A:A,A1,Sheet1!B:B)。

以下是电子表格: https://docs.google.com/spreadsheet/ccc?key= 0Avg34WusBUlRdGY1X3BSRlYxaWVkSmo3eVQzYlNvMXc



感谢您的期待。 解决方案



= JOIN(&,filter(Sheet1)/ div>

使用JOIN函数结合FILTER函数
所以在C列中: !C:C,Sheet1!A:A = A1))



希望它有帮助。


As the title says, I need to join or concatenate text from multiple rows that have matching values in one of the columns. (Using latest Firefox, Widows 7).

In Sheet1 I have a table that looks like this (sorry if it looks messy - I don't know how to do a neat table on SO):

David | 1 | Blue
Steve | 1 | Green
James | 2 |
Chris | 1 |
Steve | 3 | Blue
Jack | 1 |
Ben | 1 |
James | 1 |
Jack | 2 | Yellow
George | 4 |

In Sheet2, I would like a table that looks like this:

David |1| Blue
Steve |4| Green & Blue
James |3|
Chris |1|
Jack |3| Yellow
Ben |1|
George |4|

Column A show unique values (names) and column B shows the sum for that name.

I have successfully generated columns A and B but I'm having difficulty generating the third column which should return 'Green & Blue' for Steve and 'Yellow' for Jack etc.

Does anyone know how to do this? Your help would be much appreciated.

I have generated Sheet2 columns A and B with the follwing formulas:
Column A: =UNIQUE(Sheet1!A:A)
Column B: =SUMIF(Sheet1!A:A,A1,Sheet1!B:B).

Here is the spreadsheet: https://docs.google.com/spreadsheet/ccc?key=0Avg34WusBUlRdGY1X3BSRlYxaWVkSmo3eVQzYlNvMXc


Thanks for looking.

解决方案

Use the JOIN function combined with the FILTER function So in Column C:

=JOIN(" & ",filter(Sheet1!C:C,Sheet1!A:A=A1))

Hope it helps.

这篇关于Google电子表格 - 连接或连接多个行中具有匹配值的行中的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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