Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Google Sheets: Joined queries registering as two arguments in IFERROR() function

$
0
0

I'm joining two queries together using an array: ={query(A1:B,"Select A where B is not null");query(C1:D,"Select C where D is not null")}. I have it wrapped in an iferror() that, if there is no data in the second query, just completes the first query, i.e., =iferror({query(A1:B,"Select A where B is not null");query(C1:D,"Select C where D is not null")},query(A1:B,"Select A where B is not null"))

Finally, I put the above formula into a =forecast(), where I then get an issue. =forecast(E1,iferror({query(A1:B,"Select A where B is not null");query(C1:D,"Select C where D is not null")},query(A1:B,"Select A where B is not null")),iferror({query(A1:B,"Select B where B is not null");query(C1:D,"Select D where D is not null")},query(A1:B,"Select B where B is not null")))

This is throwing a red underline at the comma before the last query, stating that iferror() only takes 2 arguments and that this is the 3rd/4th. It seems to be counting each query contained within the brackets {} as a separate argument to the function. Strangely, it doesn't actually throw an error; the function still runs and has an output.

How can I resolve this syntax issue?


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>