在Google表格中,我有一个二维数组,其大小无法预测,由查询返回:
08-02-2020 | Red
10-02-2020 | Brown
12-02-2020 | Green
现在,我想向数组添加包含常量“ Golf”的第三列。例如:
08-02-2020 | Red | Golf
10-02-2020 | Brown | Golf
12-02-2020 | Green | Golf
是否可以将列添加到初始数组?无法用arrayformula驯服...
当前查询:
=query(transpose(query(transpose(query(transpose(query(A1:11)),"select * where Col1 > 0")),"select * where Col1 <> ''",1)),"select * where Col2 > 0")
尝试:
=ARRAYFORMULA(QUERY(TRANSPOSE(QUERY(TRANSPOSE(QUERY(TRANSPOSE(QUERY(A1:11)),
"where Col1 > 0")),
"where Col1 <> ''", 1)),
"select "&TEXTJOIN(",", 1, "Col"&TRANSPOSE(ROW(INDIRECT("A1:A"&COLUMNS(
QUERY(TRANSPOSE(QUERY(TRANSPOSE(QUERY(TRANSPOSE(QUERY(A1:11)),
"where Col1 > 0")), "where Col1 <> ''", 1)),
"where Col2 > 0"))))), "'Golf'")&" where Col2 > 0"))