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

How can I filter values matching any element of a multiple selections dropdown using FILTER?

$
0
0

Background

I have a spreadsheet with a range of source values, a dropdown from that range, and a FILTER that selects items from the source values matching the dropdown value:

ABCDE
1KeyValueSelectFiltered KeyFiltered Value
2Item 1AItem 1Item 1A
3Item 5BItem 1C
4Item 1C
5Item 12D

Cell D2 has the FILTER function, and cells in the range D3:D and E2:E are blank so that the results of the filter function can expand into them. The formula for the filter in cell D2 is:

=FILTER(A2:B5,A2:A5=C2)

Google Sheets screenshot: data validation rules

Question

I would like to change the dropdown to a multi-select using the "Allow multiple selections" option. I want the filtered result to include any values that match any of the selection options.

Google Sheets screenshot: entering multiple values in a selection

ABCDE
1KeyValueSelectFiltered KeyFiltered Value
2Item 1AItem 1, Item 5Item 1A
3Item 5BItem 5B
4Item 1CItem 1C
5Item 12D

None of the values in my dropdown will contain ", ", so there won't be the ambiguity of the joining sequence existing within a value.

How can I filter based on values in a multiple selection dropdown in my desired manner?


Viewing all articles
Browse latest Browse all 9782

Trending Articles



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