Я использую этот запрос:
=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) дублирует содержимое, а не помещает его в 2 строки
Как это исправить?