【问题标题】:How to do google sheet filtering? Group Data of One Column To one Cell?如何进行谷歌表格过滤?将一列的数据分组到一个单元格?
【发布时间】:2020-06-30 05:51:34
【问题描述】:

https://docs.google.com/spreadsheets/d/e/2PACX-1vQ9j9EuHnvBPi_IYhheTbttwG-D5JHYcSGodSl3eSydEG1z5R7PFfKAOw6G-XrNEZQnxvDg_-5PmgDp/pubhtml

我有一个类似上面链接的谷歌表格,看起来像这样

Timestamp   Exact   Username of Hacker  Video Link
6/30/2020 1:55:21   Column1DummyData    
6/30/2020 1:59:09   Column1DummyData    
6/30/2020 1:59:14   Column1DummyData    
6/30/2020 1:59:19   Column1DummyData    
6/30/2020 2:59:31   Svd 
6/30/2020 2:59:37   Svd 
6/30/2020 10:38:15  qwerty  
6/30/2020 10:44:15  test                https://www.youtube.com/watch?v=3UZzu4UQLcI 
6/30/2020 10:58:53  test                https://www.youtube.com/watch?v=HbgzrKJvDRw
6/30/2020 10:59:33  test                https://www.youtube.com/watch?v=gxpX_mubz2A

我设法使用查询做出了这样的输出:

=QUERY(B2:B, "select B,count(B) where B is not null group by B label count(B)''")

Name               NumberOfItem 

Column1DummyData         4

Svd                      2

qwerty                   1

test                     3        

但我需要这样的输出

Name               NumberOfItem    Video link

Column1DummyData         4

Svd                      2

qwerty                   1

test                     3         https://www.youtube.com/watch?v=3UZzu4UQLcI, https://www.youtube.com/watch?v=HbgzrKJvDRw, https://www.youtube.com/watch?v=gxpX_mubz2A

【问题讨论】:

    标签: google-sheets google-sheets-formula array-formulas google-sheets-query gs-vlookup


    【解决方案1】:

    尝试:

    =ARRAYFORMULA({
     QUERY(B2:B, "select B,count(B) where B !='' group by B label count(B)''"), IFNA(VLOOKUP(
     QUERY(B2:B, "select B,count(B) where B !='' group by B label count(B)''"), {
     QUERY(B2:C, "select B,count(B) where B !='' and C !='' group by B label count(B)''"), 
     REGEXREPLACE(TRIM(TRANSPOSE(QUERY(TRANSPOSE(IF(QUERY(
     QUERY(B2:C, "select count(B) where B !='' and C !='' group by B pivot C"), 
     "offset 1", 0)="",,QUERY(
     QUERY(B2:C, "select count(B) where B !='' and C !='' group by B pivot C"), 
     "limit 0", 1)&",")),,99^99))), ",$", )}, 3, 0))})
    

    【讨论】:

    • 小帮助...能否请您按降序添加排序到项目数列
    • =ARRAYFORMULA(QUERY({ QUERY(B2:B, "select B,count(B) where B !='' group by B label count(B)''"), IFNA(VLOOKUP( QUERY(B2:B, "select B,count(B) where B !='' group by B label count(B)''"), { QUERY(B2:C, "select B,count(B) where B !='' and C !='' group by B label count(B)''"), REGEXREPLACE(TRIM(TRANSPOSE(QUERY(TRANSPOSE(IF(QUERY( QUERY(B2:C, "select count(B) where B !='' and C !='' group by B pivot C"), "offset 1", 0)="",,QUERY( QUERY(B2:C, "select count(B) where B !='' and C !='' group by B pivot C"), "limit 0", 1)&",")),,99^99))), ",$", )}, 3, 0))}, "order by Col2 desc", 0))
    猜你喜欢
    • 2020-05-28
    • 1970-01-01
    • 1970-01-01
    • 2019-02-06
    • 2020-10-20
    • 1970-01-01
    • 2020-07-26
    • 2018-11-21
    • 1970-01-01
    相关资源
    最近更新 更多