Reputation: 237
=QUERY({IMPORTRANGE("sheet_name", "Social media posts!A:AI"), IMPORTRANGE("sheet_name", "Social media posts!AJ:AS")},"SELECT Col1, Col43, Col23, Col16, Col12, Col44, Col45, Col2, Col3 WHERE Col2='instagram'", 1)
Above is the query formula i enter. However, I got an error saying this:
Function ARRAY_ROW parameter 2 has mismatched row size. Expected: 1. Actual: 10434.
Upvotes: 4
Views: 17506
Reputation: 27350
Issue:
You are trying to join two arrays side by side that don't have the same number of rows.
You can only join arrays in curly brackets side by side (comma) if they have the same number of rows.
In your case, the first array returns 1
row and the second one returns 10434
rows. You can prove that if you call them separately.
The issue has to do with your conditions. You are querying two different parts of your dataset but you use the same column indexes. The column numbers between each query corresponds to different columns.
Reproducible example:
In my example this {A3:C6;E3:G4}
would work perfectly fine since ;
means that the second array should be placed below the first one. Therefore, in this case the requirement would be to have the same number of columns.
Upvotes: 8