Home > Enterprise >  Function ARRAY_ROW parameter 2 has mismatched row size
Function ARRAY_ROW parameter 2 has mismatched row size

Time:11-05

I have this issue with the arrayformula and importing with query function, the purpose of this is to use 2 search boxes with different criteria and extract the info. from a different sheet.

This formula stopped working for me :(

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

=ARRAYFORMULA(QUERY({IMPORTRANGE(Links!C2,"Supply!A2:L"),

 IMPORTRANGE(Links!C2,"Supply!A2:B")&
 IMPORTRANGE(Links!C2,"Supply!C2:D")&
 IMPORTRANGE(Links!C2,"Supply!D2:E")},

 "select Col1,Col2,Col3,Col4,Col6,Col7,Col11,Col10,Col9,Col8,Col12
  where lower(Col13) contains '"&LOWER(B1)&"'", 0))

Thanks!!!

CodePudding user response:

Try this to import all the sheet lets call it "osm" by pasting the formula in a seprate sheet and drag it to the right to get all the data, and baypass the Result too large error.

=IMPORTRANGE(Links!$C$2,"Supply!"&Substitute(Address(1,COLUMN(A1),4),"1","")&"2:"&Substitute(Address(1,COLUMN(A1),4),"1","")&"")

For all the cells in row 1

A =IMPORTRANGE(Links!$C$2,"Supply!"&Substitute(Address(1,COLUMN(A1),4),"1","")&"2:"&Substitute(Address(1,COLUMN(A1),4),"1","")&"")
B =IMPORTRANGE(Links!$C$2,"Supply!"&Substitute(Address(1,COLUMN(B1),4),"1","")&"2:"&Substitute(Address(1,COLUMN(B1),4),"1","")&"")
C =IMPORTRANGE(Links!$C$2,"Supply!"&Substitute(Address(1,COLUMN(C1),4),"1","")&"2:"&Substitute(Address(1,COLUMN(C1),4),"1","")&"")
D =IMPORTRANGE(Links!$C$2,"Supply!"&Substitute(Address(1,COLUMN(D1),4),"1","")&"2:"&Substitute(Address(1,COLUMN(D1),4),"1","")&"")
E =IMPORTRANGE(Links!$C$2,"Supply!"&Substitute(Address(1,COLUMN(E1),4),"1","")&"2:"&Substitute(Address(1,COLUMN(E1),4),"1","")&"")
F =IMPORTRANGE(Links!$C$2,"Supply!"&Substitute(Address(1,COLUMN(F1),4),"1","")&"2:"&Substitute(Address(1,COLUMN(F1),4),"1","")&"")
G =IMPORTRANGE(Links!$C$2,"Supply!"&Substitute(Address(1,COLUMN(G1),4),"1","")&"2:"&Substitute(Address(1,COLUMN(G1),4),"1","")&"")
H =IMPORTRANGE(Links!$C$2,"Supply!"&Substitute(Address(1,COLUMN(H1),4),"1","")&"2:"&Substitute(Address(1,COLUMN(H1),4),"1","")&"")
I =IMPORTRANGE(Links!$C$2,"Supply!"&Substitute(Address(1,COLUMN(I1),4),"1","")&"2:"&Substitute(Address(1,COLUMN(I1),4),"1","")&"")
J =IMPORTRANGE(Links!$C$2,"Supply!"&Substitute(Address(1,COLUMN(J1),4),"1","")&"2:"&Substitute(Address(1,COLUMN(J1),4),"1","")&"")
K =IMPORTRANGE(Links!$C$2,"Supply!"&Substitute(Address(1,COLUMN(K1),4),"1","")&"2:"&Substitute(Address(1,COLUMN(K1),4),"1","")&"")

Then paste this in place of your formula

=ArrayFormula(
 LAMBDA(i, 
 QUERY({i,i&i&i},
 "select Col1,Col2,Col3,Col4,Col6,Col7,Col11,Col10,Col9,Col8,Col12
  where lower(Col13) contains '"&LOWER(Permisos_supply!B4)&"' AND lower(Col2) CONTAINS '"&LOWER(Permisos_supply!B3)&"'", 0))({osm!A:K}))
  • Related