Search code examples
google-sheetsfiltergoogle-sheets-formulaspreadsheet

Filter Non-Empty Responses with Partial Match from Cell Range


I am looking to filter survey submissions based on a range of partial text options (Dashboard!A:A). However, I would like to set the filter to non-empty cells (Folks who did not submit an answer in that particular survey question). See below for the sample spreadsheet:

https://docs.google.com/spreadsheets/d/15sLXJfZEtoIYzxKjBn0954eO3U65do85oGNTR-mGZMQ/edit#gid=0. Here is what I am looking to filter:

  • Filter responses from: 'Responses!B:B'
  • IF 'Responses!B:B' is NOT Empty
  • AND 'Responses!A:A' is within Range (Dashboard!A:A).

Dashboard!A:A contains only some of the full text from Responses!A:A, so I need to be able to filter with partial text. I have tried REGEXMATCH with no success:

=FILTER(Responses!B:B, REGEXMATCH(Responses!A:A, Dashboard!A:A) ,Responses!B:B<>"")

Any help would be greatly appreciated!


Solution

  • Try

    =filter(Responses!B2:B, len(Responses!B2:B), regexmatch(Responses!A2:A, textjoin("|", 1, Dashboard!A2:A15)))
    

    or if you want to return columns A and B

    =filter(Responses!A2:B, len(Responses!B2:B), regexmatch(Responses!A2:A, textjoin("|", 1, Dashboard!A2:A15)))