Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

How to filter combined search outputs with OR logic

$
0
0

I have a working Google Sheets filter formula that combines different searches of the same range.

In the formula below, I'm searching column AA in the REFS worksheet.

I enter search terms into any or all cells AA1 - AD1 in the current sheet.

This formula searches for each of these criteria and displays rows matching ALL search terms.

=IFNA(filter(REFS!$A$3:$AA,IF(AA1<>"",SEARCH(AA1,REFS!AA3:AA),"")+IF(AB1<>"",SEARCH(AB1,REFS!AA3:AA),"")+IF(AC1<>"",SEARCH(AC1,REFS!AA3:AA),"")+IF(AD1<>"",SEARCH(AD1,REFS!AA3:AA),"")),"")

This works fine whether I supply one or multiple criteria.

However, this is an ALL search. It only displays rows matching all search criteria.

I need an OR version of this to display rows that match any search criteria.


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>