简体   繁体   中英

Refining a Query formula with two 'where' conditions

I need to write a Query formula to pull through unique values from another sheet, excluding rows that contain certain keywords and also excluding any empty rows.

I've written this formula:

=UNIQUE(QUERY('Sheet Name':A1,AZ,"Select A where A is not null and where not A contains 'STRING'",1))

Unfortunately this gives a VALUE error. It works with either of the 'where' clauses but not with both.

What am I missing?

You don't need to add the seconde 'Where', it just implies that you continue to add conditions into that statement:

=UNIQUE(QUERY('Sheet Name'!A1:AZ,"Select A where A is not null and not A contains 'STRING'",1))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM