Search code examples
google-sheetsgoogle-sheets-formula

Substituting a value for a reference


I feel like this should have a simple answer. I have the following formula:

=query(DATA, "select * where A='Tues'")

I want it to reference the contents of a specific cell to use as a filter, for example A1, instead of manually inputting the filter ('Tues' for example) into the formula when I want to change it. Thank you!


Solution

  • Try-

    =QUERY(DATA,"select * where A='" & A1 & "'")