I have a table with data in columns A-U. Rows go down to 368. I would like to pull (onto a different sheet) all the information in columns A-F where it matches a keyword from a dropdown menu (in cell A1 of this new sheet). It should search columns S, T, or U for matches to that keyword (in A1).

I've tried:

 iferror(QUERY(Data, "select A, B, C, D, E, F where S = """&A1&"""", 0),A1:U368/0);
 iferror(QUERY(Data, "select A, B, C, D, E, F  where T = """&A1&"""", 0),A1:U368/0);
 iferror(QUERY('Data, "select A, B, C, D, E, F  where U = """&A1&"""", 0),A1:U368/0)}))

The problem I am finding is that if the keyword is present in all three columns it will return the data, but if the keyword is not present in say column U, it won't return any of the data (even if there are matches in S or T).

Is there a simpler way of running this QUERY? I basically want to say show me the data if S = A1, OR T = A1, OR U = A1 but cannot figure out how to do that.

  • pls share a copy of your sheet
    – user0
    Aug 30, 2019 at 22:15

1 Answer 1


 "select B,C,D,E 
  where C = '"&A1&"' 
     or D = '"&A1&"' 
     or E = '"&A1&"'", 0)


  • Thanks! I did eventually figure that out. Now I'm trying to add a second dropdown (in your above example sheet into cell B1) which would query another column of information within the results from the first query (A1). Is there a way to do this? i.e. =QUERY(B2:E,"select * where C = '"&A1&"' or D = '"&A1&"' or E = '"&A1&"'" AND F = '"&B1&"'", 0) Sep 7, 2019 at 14:19
  • I figured this part out: =QUERY(B2:E,"select * where (C = '"&A1&"' or D = '"&A1&"' or E = '"&A1&"') AND F = '"&B1&"'", 0) But now if there's nothing in B1 it shows no results. I'd like it to default to just showing the results of the first parameter if the second parameter is empty, is that possible? Sep 8, 2019 at 18:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.