Search code examples
regexfiltergoogle-sheetsuniquegoogle-sheets-formula

Unique filter which ignores multiple values


So this is the formula I have for filter;

=unique(filter('Equipment Tracking'!D:D,'Equipment Tracking'!D:D<>""))

which shows me all the things I need and ignores all blank cells, however, I just need a way of ignoring other certain values in this list as well.

For example, my list currently looks like

this

and I need to ignore values like broken and missing


Solution

  • you can simply ad 2nd, 3rd, n-th parameter to the FILTER fx like:

    =UNIQUE(FILTER('Equipment Tracking'!D:D, 'Equipment Tracking'!D:D<>"",
                                             'Equipment Tracking'!D:D<>"moon"))
    

    also you can use regex if you have a larger list to ignore:

    =UNIQUE(FILTER('Equipment Tracking'!D:D, 'Equipment Tracking'!D:D<>"",
                                  REGEXMATCH('Equipment Tracking'!D:D, "[^moon|sun|mars]")))