【发布时间】:2019-07-10 12:20:46
【问题描述】:
我正在尝试嵌套 Google 表格查询,但似乎无法正常工作。我有一个有效的公式,但问题是它将来自不同日期的学生混合在一起。该公式应该返回TODAY() 和TODAY()+3 之间的所有学生,但应该首先使用TODAY() 学生然后TODAY()+1 等。目前,它首先列出指定日期的所有学生,然后再移动到巢表学生 2 级。
我尝试嵌套查询,然后在最后提供一个我还没有成功的条件。我需要查询在最后共享相同的条件,以便列表按日期排序。或者,如果有办法操纵我当前的公式按日期排序仍然可以。
这是我希望在您的帮助下操纵的工作公式:
={query('Students Level A'!A2:EC, " select EC where A is not null and not
B contains '-' and EC>=date"""&TEXT(TODAY(),"yyyy-mm-dd")&""" and
EC<=date"""&TEXT(TODAY()+3,"yyyy-mm-dd")&""" and not B matches '[\d- ]
{5}' order by EC");
query('Students Level B'!A2:EC, " select EC where A is not null and not B
contains '-' and EC>=date"""&TEXT(TODAY(),"yyyy-mm-dd")&""" and
EC<=date"""&TEXT(TODAY()+3,"yyyy-mm-dd")&""" and not B matches '[\d- ]
{5}' order by EC");
query('Students Level C'!A2:EC, " select EC where A is not null and not B
contains '-' and EC>=date"""&TEXT(TODAY(),"yyyy-mm-dd")&""" and
EC<=date"""&TEXT(TODAY()+3,"yyyy-mm-dd")&""" and not B matches '[\d- ]
{5}' order by EC")}
我正在寻找类似的东西:
={query('Students Level A'!A2:EC);query('Students Level
B'!A2:EC);query('Students Level C'!A2:EC), "select EC where A is not null
and not B contains '-' and EC>=date"""&TEXT(TODAY(),"yyyy-mm-dd")&""" and
EC<=date"""&TEXT(TODAY()+3,"yyyy-mm-dd")&""" and not B matches '[\d- ]
{5}' order by EC"}
在这个公式中,我首先嵌套查询,然后为之后的所有查询提供一个条件。但是这个公式行不通。
【问题讨论】:
标签: arrays google-sheets google-sheets-formula google-sheets-query google-query-language