我使用这个查询:
=IF(D1=TRUE,ARRAYFORMULA(QUERY({IFERROR(QUERY({
IFERROR(QUERY(A4:G,"select A,B,C,'30',E where A is not null and E contains 'Days' or E is null Label '30' '' ",0),{"","","","",""});
IFERROR(QUERY(A4:G,"select A,B,C,'60',F where A is not null and F contains 'Days' or F is null Label '60' '' ",0),{"","","","",""});
IFERROR(QUERY(A4:G,"select A,B,C,'90',G where A is not null and G contains 'Days' or G is null Label '90' '' ",0),{"","","","",""})},
"Select * where Col1 is not null",0),""),
VALUE(REGEXEXTRACT(IFERROR(QUERY({
IFERROR(QUERY(A4:G,"select A,B,C,'30',E where A is not null and E contains 'Days' or E is null Label '30' '' ",0),{"","","","",""});
IFERROR(QUERY(A4:G,"select A,B,C,'60',F where A is not null and F contains 'Days' or F is null Label '60' '' ",0),{"","","","",""});
IFERROR(QUERY(A4:G,"select A,B,C,'90',G where A is not null and G contains 'Days' or G is null Label '90' '' ",0),{"","","","",""})},
"Select Col5 where Col1 is not null",0),""),"\d+"))}, "select Col1,Col2,Col3,Col4,Col5 where Col6 <=10 order by Col6")),""
)

我的问题是第一行(单元格I4 )复制了内容,而不是将其放在两行中
如何纠正这一点?
发布于 2019-05-03 23:09:30
也许可以试试:
=IF(D1=TRUE,ARRAYFORMULA(QUERY({IFERROR(QUERY({
IFERROR(QUERY(A4:G,"select A,B,C,'30',E where A is not null and E contains 'Days' or E is null Label '30' '' ",0),{"","","","",""});
IFERROR(QUERY(A4:G,"select A,B,C,'60',F where A is not null and F contains 'Days' or F is null Label '60' '' ",0),{"","","","",""});
IFERROR(QUERY(A4:G,"select A,B,C,'90',G where A is not null and G contains 'Days' or G is null Label '90' '' ",0),{"","","","",""})},
"Select * where Col1 is not null",0),""),
VALUE(REGEXEXTRACT(IFERROR(QUERY({
IFERROR(QUERY(A4:G,"select A,B,C,'30',E where A is not null and E contains 'Days' or E is null Label '30' '' ",0),{"","","","",""});
IFERROR(QUERY(A4:G,"select A,B,C,'60',F where A is not null and F contains 'Days' or F is null Label '60' '' ",0),{"","","","",""});
IFERROR(QUERY(A4:G,"select A,B,C,'90',G where A is not null and G contains 'Days' or G is null Label '90' '' ",0),{"","","","",""})},
"Select Col5 where Col1 is not null",0),""),"\d+"))}, "select Col1,Col2,Col3,Col4,Col5 where Col6 <=10 order by Col6", 0)),""
)https://stackoverflow.com/questions/55963044
复制相似问题