Query formula in sheets turns into sublistlookup

Hi folks,
I have a formula in a sheet that contains a query; it reads as follows:
=if($H156="","", query(โ€˜Order detailsโ€™!$D$2:$V,โ€œSelect V where LOWER(D) = 'โ€&lower($B156)&"โ€™ "))

Itโ€™s being turned into if(RC8="","", sublistlookup(index(โ€˜Order detailsโ€™!C22:C22,match(RC2,โ€˜Order detailsโ€™!C4:C4,0)),index(โ€˜Order detailsโ€™!C21:C21,match(RC2,โ€˜Order detailsโ€™!C4:C4,0)),RC8))

by Appsheet,

When a new row is added it doesnโ€™t compute correctly.

Any suggestions? Iโ€™ve regenerated the structure in Data/Columns a couple of times to no avail
Thanks
Chris

0 3 170
3 REPLIES 3

Thanks - but I have no mismatched formula warnings, and the R1C1 syntax appear to be correctโ€ฆ

QUERY formula returns an array and expands to multiple columns and rows depending on the SELECT parameter. So with each row of the sheet coincides with the selection range. Why do you need that QUERY formula? Provided you wish to return only a single value from another table, you can use VLOOKUP - though you can handle that easily with AppSheetโ€™s LOOKUP() expression as well where using spreadsheet formulas in the back-end might drastically affect appโ€™s sync durration

Top Labels in this Space