【问题标题】:Filter dates from different spreadsheets for the last 10 days in Google Sheets在 Google 表格中过滤过去 10 天的不同电子表格中的日期
【发布时间】:2021-05-20 22:36:45
【问题描述】:

我有一个包含 4 个选项卡的表格,其中包含多个数据,其中报告注册的日期和时间在 A 列中。我创建了一个新选项卡,它将收集所有其他表格数据。所以我使用QUERY:

=QUERY({
Sheet2!A1:D;
Sheet3!A1:D;
Sheet4!A1:D;
Sheet5!A1:D
},
"select * where Col2 is not null order by Col1",0)

但是,我需要将按过去 10 天排序的所有数据放入 Sheet1:

https://docs.google.com/spreadsheets/d/1mzFEEZwDma0MAUUBnlmXvwWjCBpeDiaBDDXB584fu7A/edit#gid=0

注意:查询已经按日期排序

【问题讨论】:

    标签: arrays sorting google-sheets google-sheets-formula google-query-language


    【解决方案1】:

    尝试升序:

    =SORT(QUERY(SORT({
     Sheet2!A1:D;
     Sheet3!A1:D;
     Sheet4!A1:D;
     Sheet5!A1:D}, 1, 0),
     "where Col2 is not null limit 10", 0))
    

    或降序:

    =QUERY(SORT({
     Sheet2!A1:D;
     Sheet3!A1:D;
     Sheet4!A1:D;
     Sheet5!A1:D}, 1, 0),
     "where Col2 is not null limit 10", 0)
    

    【讨论】:

    • 太棒了。额外的一点:可以升序或降序排序吗?
    猜你喜欢
    • 2012-12-20
    • 1970-01-01
    • 2022-01-18
    • 2014-09-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-06-10
    相关资源
    最近更新 更多