I am unable to figure out how could we use formula within query results. I did not find any solution yet.
Like:
=query(sheet1!A1:Z,"Select A,B,Vlookup(D,sheet1!A1:A,1,false)");
I am unable to figure out how could we use formula within query results. I did not find any solution yet.
Like:
=query(sheet1!A1:Z,"Select A,B,Vlookup(D,sheet1!A1:A,1,false)");
A1:Z
, the column where you can insert the formula without error must be bigger than ZD
is a string, it should be nested in double quotes=query(Sheet1!A1:Z, CONCATENATE("select A,B,",Vlookup("D",Sheet1!A1:A,1,false)))
you can't. you need to do:
=ARRAYFORMULA({sheet1!A:B, IFNA(VLOOKUP(D:D, sheet1!A:A, 1, 0))})
and then you can play with query:
=ARRAYFORMULA(QUERY({sheet1!A:B, IFNA(VLOOKUP(D:D, sheet1!A:A, 1, 0))}, "select Col1,Col2,Col3", 0)