Take the following spreadsheet:
I want to create a query that returns the values in columns A and B where A matches 'f' and also return the value that is in cell D1 (Test Cell).
Here is the Query that I wrote:
=QUERY(A2:B7,"select A,B,'"&D1&"' where A='f'")
This is what I expected:
This is what actually happens:
I'm not sure where the value of "Test Cell()" in C11 is coming from and I suspect it's a bug. Is there a way to accomplish what I am attempting?
CodePudding user response:
try:
=QUERY(A2:B7, "select A,B,'"&D1&"' where A='f' label '"&D1&"'''")
or:
=QUERY(QUERY(A2:B7, "select A,B,'"&D1&"' where A='f'", ), "offset 1", )