Regex 如何在Google工作表中组合具有相同ID的行?
我正在尝试合并Google工作表中具有相同ID的行 发件人: 致: 是否有一种自动的方法可以在谷歌表单中使用它的本地功能来实现这一点Regex 如何在Google工作表中组合具有相同ID的行?,regex,google-sheets,google-sheets-formula,array-formulas,google-sheets-query,Regex,Google Sheets,Google Sheets Formula,Array Formulas,Google Sheets Query,我正在尝试合并Google工作表中具有相同ID的行 发件人: 致: 是否有一种自动的方法可以在谷歌表单中使用它的本地功能来实现这一点 =ARRAYFORMULA(QUERY({INDEX(QUERY(A1:B, "select A,count(A) where A is not null group by A pivot B", 0), , 1), REGEXREPLACE(TRIM(TRANSPOSE(QUERY(TRANSPOSE(IF(ISNUMBER(QUERY(A1:B, "
=ARRAYFORMULA(QUERY({INDEX(QUERY(A1:B,
"select A,count(A) where A is not null group by A pivot B", 0), , 1),
REGEXREPLACE(TRIM(TRANSPOSE(QUERY(TRANSPOSE(IF(ISNUMBER(QUERY(A1:B,
"select count(A) where A is not null group by A pivot B", 0)), INDEX(QUERY({A1:A,B1:B&";"},
"select count(Col1) where Col1 is not null group by Col1 pivot Col2 offset 1", 0), 1,), ))
, , 999^99))), ";$", )}, "offset 1", 0))
谢谢@player0,还有一个问题:有没有办法在“;”中使用换行符?
ID | Category
Augur | A1; A2; A3
Augur1 | A1; A2; A3
=ARRAYFORMULA(QUERY({INDEX(QUERY(A1:B,
"select A,count(A) where A is not null group by A pivot B", 0), , 1),
REGEXREPLACE(TRIM(TRANSPOSE(QUERY(TRANSPOSE(IF(ISNUMBER(QUERY(A1:B,
"select count(A) where A is not null group by A pivot B", 0)), INDEX(QUERY({A1:A,B1:B&";"},
"select count(Col1) where Col1 is not null group by Col1 pivot Col2 offset 1", 0), 1,), ))
, , 999^99))), ";$", )}, "offset 1", 0))