Search code examples
google-sheetsgoogle-sheets-formula

Checking for an option in a multi-select dropdown


I'm working in Google Sheets to attempt to count which cells from a given column contain a specific option included in a multi-select dropdown menu, whether or not other options are selected.

ie: Cards can be Artifacts, Creatures, or Artifact Creatures, and I want to include the row in the calculation if it is an Artifact, or an Artifact Creature, but not if it's just a Creature.

Type Qty Reprint?
Artifact 4
Creature 2
Artifact Creature 4
Artifact 4 True

This link

I've attempted a fair few variations on a theme of =COUNTIFS($A$2:$A,false,$D$2:$D,QUERY($D$2:$D,"select Col1 where Col1 contains 'Artifact'") with attempts to split it with and without tocol, and with and without commas to deliminate

There should be 13 results, as there are 13 non-reprint cards in this set that are artifacts, but I can only ever get 11 (which excludes the two artifact creatures) or 0.


Solution

  • How about using this formula?

    =Countifs($A$2:$A,false,$D$2:$D,"*"&H18&"*",$F$2:$F,">0")