Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Function ARRAY_ROW parameter 2 has mismatched row size. Expected: 1. Actual: 10434

=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.

like image 822
Jcbyte Avatar asked Oct 15 '25 17:10

Jcbyte


1 Answers

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:

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.

like image 143
soMarios Avatar answered Oct 18 '25 04:10

soMarios



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!