I am importing data from two different Google sheets and merging them in another sheet. The formula which I used is as below .
=QUERY({
IFERROR(QUERY(
{ IMPORTRANGE("" , "Sheet1!$A$1:$b") },
"SELECT Col1,Col2 WHERE Col2='Total'",
0
)) ;
IFERROR(QUERY(
{ IMPORTRANGE("" , "Sheet1!$a$1:$b") },
"SELECT Col1,Col2 WHERE Col2='Yes'",
0
))
})
In above formula, importrange is giving the result when both sheets have data to import, but if any one sheet has no data to import the data from another sheet is not getting imported. I had figured a solution at below link where we can handle this issue by using dummy column reference, this approach is fine when we have few sheets to import with few columns but when we are importing from many sheets and many column to import the dummy column reference gets too long. Is there any other way to solve this issue.