【问题标题】:google sheets additional custom column in filter谷歌表格过滤器中的附加自定义列
【发布时间】:2021-01-18 15:53:12
【问题描述】:

我喜欢在过滤器公式中添加一个额外的列。这个工作正常,但不完全是我需要的:

=FILTER({detroit!A2:N,"detroit"&row(detroit!A2:A)},detroit!A2:A<>"")

我只需要没有行号的文本“detroit”,如下所示:

=FILTER({detroit!A2:N,"detroit"},detroit!A2:A<>"")

我想我需要为每个单元格使用一个函数,比如行,什么没有返回?

由于数据的大小,它还必须快速计算。

有解决这个问题的想法吗?

【问题讨论】:

    标签: google-sheets google-sheets-formula


    【解决方案1】:

    在 Z 列为空的地方试试这个:

    =FILTER({detroit!A2:N, detroit!Z2:Z&"detroit"}, detroit!A2:A<>"")
    

    如果您没有任何空列,请使用:

    =FILTER({detroit!A2:N, 
     IFERROR(SEQUENCE(ROWS(detroit!A2:A))/0)&"detroit"}, detroit!A2:A<>"")
    

    你也可以这样做:

    =QUERY(detroit!A2:N, 
     "select A,B,C,D,E,F,G,H,I,J,K,L,M,N,'detroit' 
      where A is not null 
      label 'detroit'''", 0)
    

    【讨论】:

    • 非常感谢 :) 所有解决方案都很方便,具体取决于工作表结构。特别感谢查询解决方案。你太棒了。
    猜你喜欢
    • 2019-10-19
    • 1970-01-01
    • 1970-01-01
    • 2014-08-23
    • 2013-01-21
    • 2013-01-21
    • 2017-09-29
    • 1970-01-01
    • 2021-05-18
    相关资源
    最近更新 更多