I have requirement where I have range for which I want to perform count. Because there is a condition, I want to use COUNTIF/COUNTIFS function. In criteria, I want to use range as I have multiple value that can be matched. Following is an example
Values to be counted - APPLE, MANGO, ORANGE, MANGO, APPLE, APPLE, ORANGE, ORANGE
What I want is count for APPLE and ORANGE for example but I want to keep it generelized. That means in another column I want to put values for which I want count. So at a time I can put only APPLE, at another time APPLE, MANGO and so on. If I'm still not clear enough then in another words, I want a count of values which are determined by the values in another range.
I could not find any way to use range in the 'criteria' parameter of the COUNTIF/COUNTIFS function. I know I can use sum of multiple COUNTIF with different value in each 'criteria' but that becomes hardcoded and everytime I need to change the formula.
Can someone help with how can I use a range (instead of single value) in 'criteria' ?