I have a Google Spreadsheet and I want to run a QUERY
function. But I want the WHERE
statement to check a series of values. I'm basically looking for what I would use an IN
statement in SQL - what the IN
equivalent in Google Spreadsheets? So right now I have:
=QUERY(Sheet1!A3:AB50,"Select A,B, AB WHERE B='"& G4 &"'")
And that works. But what I really need is the equivalent of:
=QUERY(Sheet1!A3:AB50,"Select A,B, AB WHERE B='"& G4:G7 &"'")
And of course, that statement fails. How can I get the where against a range of values? These are text values, if that makes a difference.