I want to import a few spreadsheets into one with some criteria, unfortunately if one of the spreadsheets doesn't return any data, the ARRAYFORMULA is asking for ARRAY_LITERAL instead of empty result.
What do I need to use in the IFERROR function so that ARRAYFORMULA appends nothing and is happy to continue?
This is what I have now:
={
QUERY(IMPORTRANGE("<spreadsheet>", "Range!B2:J"), "SELECT Col1, Col2, Col3, Col5, Col9 WHERE Col1 <> '' AND Col5 >= 18 ");
IFERROR(QUERY(IMPORTRANGE("<spreadsheet2>", "Range!B2:K"), "SELECT Col1, Col3, Col2, Col4, Col6, Col10 WHERE Col10 <> '' AND Col6 >= 18"), "")
}
I wrapped the second one in IFERROR but the empty string is not a valid ARRAY_LITERAL, so what can I do instead of it?
Full error:
In ARRAY_LITERAL, an Array Literal was missing values for one or more rows.
I realised I could give it an empty row with the same number of columns like I1:N2 but you never know if you might need to use these columns and then the query would need to change.