首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何使此查询正确?

如何使此查询正确?
EN

Stack Overflow用户
提问于 2019-05-03 11:48:18
回答 1查看 107关注 0票数 0

我使用这个查询:

代码语言:javascript
运行
复制
=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 )复制了内容,而不是将其放在两行中

如何纠正这一点?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-05-03 23:09:30

也许可以试试:

代码语言:javascript
运行
复制
=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)),""
)
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55963044

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档