Query Function in Google Sheets- Looking for two names in one column also using import range

Viewed 90

Hello I am trying to pull two different names within the same column while pull from another column for example also using importrange.

=query(IMPORTRANGE("https://docs.google.com/spreadsheets/","Department Import!A:N"),"select * where Col7='Josh' Col7=""Da'rone"" and Col1=2022 ")

I keep getting an error with pulling from col7.

1 Answers

You have the right idea but you are missing an operator. You need to include OR.

FORMULA

=query(IMPORTRANGE("https://docs.google.com/spreadsheets/","Department Import!A:N"),"select * where (Col7='Josh' OR Col7=""Da'rone"") and Col1=2022 ")

Related