Google Sheets – Filter Column Based on Another Column Using Query

filterformulasgoogle sheetsgoogle-sheets-query

I am trying to make a filter with a query based in a column, but I cannot make it works.

https://docs.google.com/spreadsheets/d/1zKMW8vuyHRpS8eVEmRgAOg_dBQ0r2OIXnqV3_TFEm9o/edit?usp=sharing

This is a template for something near to what I am trying to do.

Imagine I have a lot of info (+70.000 rows) and I need to filter it to see only active workers.

The only way it worked for me is with this manual formula:

=FILTER(E1:H,,E1:E<>B1,E1:E<>B2,...)

But maybe there is another way to do, for just add names in the "not actives" column, and automatically the active workers are updated.

I don't know if it's clear, but I can add some info. This formula in Query worked to me for only one name:

=QUERY(A2:H,"Select E, F, G,H where E !='"&B2&"'' and E is not null")

But if I tried to make it with all the column:

`=QUERY(A2:H,"Select E, F, G,H where E !='"&B2:B&"'' and E is not null")

It's not working.

Is there another way to filter all the data?

Best Answer

=FILTER(E2:H, NOT(COUNTIF(B2:B, E2:E)))

0