Search code examples
google-sheetsgoogle-sheets-formulagoogle-sheets-querygoogle-query-language

Can I put the 'query' part of a =QUERY in a cell?


I am playing with Google Spreadsheet's =QUERY(), and I was wondering if / how I can put the query part in a cell. For, for example, I have

=QUERY(dataset, B1, 1)

in cell A1, and

SELECT *

in cell B1.

When I try it, I get a #REF! error in cell A1. If I change the query string though, I get a #VALUE error, so it does do something, but not what I expect.


Solution

  • perhaps try:

    =QUERY(dataset; B1; 1)
    

    0