I'm trying to make it so that I can select two types of membership for one individual (e.g. volunteer and family).
2 Answers
There are scripted solutions such as multiSelectDropDownList_ that let you choose more than one value in a dropdown. The values typically get joined together with a comma separator. There are downsides, such as these cells showing a red triangle in the corner and an error message when you hover over them.
It would probably more make sense to insert as many columns as you have membership types and Insert > Checkbox in those columns to let you choose any combination of membership types for each individual.
A QUERY
with Matches
formula suggestion:
=ArrayFormula(
IFNA(
QUERY(A3:C9, "SELECT * WHERE LOWER(B) MATCHES LOWER('"&E1&"') AND LOWER(C) CONTAINS LOWER('"&E2&"')", 0),
"No Matches Found.")
)
Input and Output:
E1
accepts the regular expression "Fruit|Vegetable
" matching the corresponding input rows values from range A3:C9
, and returns the corresponding filtered values in range A12:C15
.
DEMO:
Sample:
Title1 | Title2 | Title3 | Title4 | Title5 |
---|---|---|---|---|
Fruit | ||||
comestible | ||||
Banana | Fruit | comestible | ||
Cucumber | Vegetable | comestible | ||
Cherry | Fruit | comestible | ||
Cod | Fish | comestible | ||
Mercury | Metal | inedible | ||
Spinach | Vegetable | comestible | ||
Onyx | Mineral | inedible | ||
Banana | Fruit | comestible | ||
Cucumber | Vegetable | comestible | ||
Cherry | Fruit | comestible | ||
Spinach | Vegetable | comestible |
Sources and references:
Matches Regular Expression Match in Google Sheets Query
How to Use Cell Reference in Google Sheets Query
Helpful Preliminary Query Formula Concepts:
Google Sheets Query Formula with Dropdown List (Data Validation) Cell Reference - Dynamic Dashboard
QUERY - Drop Down List to Filter Data - Google Sheets
Script Alternatives:
Google Sheets Tutorial – How to Enable Multiple Selection Data Validation Using Apps Script
How to Make Multiple Selection in Drop-down Lists in Google Sheets