# COUNTIF VALUE SELECTED IN MULTIPLE SELECTION FIELD IN SUBTABLE

Hi,

I have a subtable, in which it has a multiple selection field (A3). I would like to count the number of selection “Apple” in the subtable. I’ve tried the formula : COUNTIF(A3, ‘APPLE’) but it only calculates entries with only “Apple” selected, if I have both “Apple” and “Banana” selected, it doesnt counts. I’ve also tried added wildcards around the word like “Apple”, and also tried using A3.RAW, but all those doesnt work. Any ideas?

For example the subtable looks like this:
No | Name | Fruit
1 | Lisa | Apple, Banana
2 | John | Cucumber
3 | Amy | Apple
4 | Ben | Cucumber, banana
5 | Charlie | Apple. Pear

And I would like a formula to show [Apple : 3], in the example subtable above.

If you are using Multi-select field. You should use:
Multiple Select Field Formulas

Hi, tried a few variations of the formula
COUNTIF(A3,INCLUDES_ANY(A3,‘Apple’))
COUNTIFS(A3,INCLUDES_ANY(A3,‘Apple’))
COUNTIF(INCLUDES_ANY(A3,‘Apple’))
COUNTIFS(INCLUDES_ANY(A3,‘Apple’))

None works

I am not sure if COUNTIF can be used together with INCLUDES_ANY or not.
If it doesn’t work together, the potential workaround will be add another “Check” field in the subtable for the INCLUDES_ANY() formula.

e.g if the Check field is in D3.
formula for D3:
IF(INCLUDES_ANY(A3,‘Apple’),“Yes”,“No”)

Then use:
COUNTIF(D3,“Yes”)