Reputation: 611
I have this setup in my worksheet
where column A contains the conditions I need to look out for,
column B contains the total number of records that fit the conditions,
and columns D and E contain the records I need to count
what I want to happen is to create a formula for column B where it can count the total records that fit 2 conditions I need
for example in the case of B3, there are 2 instances of Dog Red in column E where column D contains the word small, and for B3 there is only 1 instance of Dog Red where column D contains the word large
the same conditions apply for the rest of column B
is there a way to compute for the total records that fit the 2 conditions in a single cell?
Upvotes: 0
Views: 21
Reputation: 14373
The formula below will work for B3:B4. For B6:B7 the reference to A$2
would have to be changed manually.
=COUNTIFS($E$3:$E$9,A$2,$D$3:$D$9,"*"&A3&"*")
It should be possible to extend the formula to be able to find the right color dog in column A so that you can copy the formula down all the way without change. I haven't done this here because I feel your example isn't representative of your final worksheet. For the moment, please just take note that your arrangement of count criteria makes referencing them difficult. Perhaps a better way of displaying them can be found.
Upvotes: 1