我需要通过列M正确地对单元格I3中的查询进行排序
我有这个公式
=ArrayFormula(IFERROR(QUERY({
IFERROR(QUERY({A3:G},"Select Col1,Col2,Col3,'30',Col5 where Col5 contains 'Days' Label '30' '' ",0),{"","","","",""});
IFERROR(QUERY({A3:G},"Select Col1,Col2,Col3,'60',Col6 where Col6 contains 'Days' Label '60' '' ",0),{"","","","",""});
IFERROR(QUERY({A3:G},"Select Col1,Col2,Col3,'90',Col7 where Col7 contains 'Days' Label '90' '' ",0),{"","","","",""})},
"Select * where Col1 is not null order by Col5",0),""))
我一直在努力工作几个小时没有运气
我根据需要制作了一个标签,预期结果
=ARRAYFORMULA(QUERY({IFERROR(QUERY({
IFERROR(QUERY({A3:G},"select Col1,Col2,Col3,'30',Col5 where Col5 contains 'Days' Label '30' '' ",0),{"","","","",""});
IFERROR(QUERY({A3:G},"select Col1,Col2,Col3,'60',Col6 where Col6 contains 'Days' Label '60' '' ",0),{"","","","",""});
IFERROR(QUERY({A3:G},"select Col1,Col2,Col3,'90',Col7 where Col7 contains 'Days' Label '90' '' ",0),{"","","","",""})},
"Select * where Col1 is not null",0),""),
VALUE(REGEXEXTRACT(IFERROR(QUERY({
IFERROR(QUERY({A3:G},"select Col1,Col2,Col3,'30',Col5 where Col5 contains 'Days' Label '30' '' ",0),{"","","","",""});
IFERROR(QUERY({A3:G},"select Col1,Col2,Col3,'60',Col6 where Col6 contains 'Days' Label '60' '' ",0),{"","","","",""});
IFERROR(QUERY({A3:G},"select Col1,Col2,Col3,'90',Col7 where Col7 contains 'Days' Label '90' '' ",0),{"","","","",""})},
"Select Col5 where Col1 is not null",0),""),"\d+"))}, "select Col1,Col2,Col3,Col4,Col5 order by Col6"))
19 Days
之前的2 Days
为1 <2Days
,您的查询将正常工作。=ArrayFormula(IFERROR(QUERY({
IFERROR(QUERY({A3:G},"Select Col1,Col2,Col3,'30',Col5 where Col5 contains 'Days' Label '30' '' ",0),{"","","","",""});
IFERROR(QUERY({A3:G},"Select Col1,Col2,Col3,'60',Col6 where Col6 contains 'Days' Label '60' '' ",0),{"","","","",""});
IFERROR(QUERY({A3:G},"Select Col1,Col2,Col3,'90',Col7 where Col7 contains 'Days' Label '90' '' ",0),{"","","","",""})},
"Select Col1,Col2,Col3,Col4,Col5 where Col1 is not null format Col5 '0 Days' order by Col5",0),""))
Days
应输入2或3位数:19 Days
和02 Days
。