How to combine rows with same ID in Google Sheets?

前端 未结 1 681
自闭症患者
自闭症患者 2021-01-27 03:20

I\'m trying to merge rows with same IDs in Google Sheets

From:

ID     | Category
Augur  | A1
Augur  | A2
Augur  | A3
Augur1 | A1
Augur1 | A2
Augur1 | A3
         


        
相关标签:
1条回答
  • 2021-01-27 03:32
    =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))
    

    0 讨论(0)
提交回复
热议问题