I everyone,
I am new to using Excel to this level and I am trying to do a complex count where there are a combination of AND and OR criteria.
I have managed similar things by using =count(if( and entering the formula as an array, however, this particular scenario seems to have too many variants. I have also tried using =sum and =sumproduct. I have achieved the first part of my query by using =sum but the formula is very long and messy - I'm sure there must be a better/easier way to achieve the result.
Using the example data in the table below, I am trying to achieve 2 different counts:-
Count where:-
Column A = 1 AND column D = Fruit AND Columns E-G = Apple OR Pear OR Orange OR Raspberry OR Lime OR Banana (the answer I'm looking for is 9)
I then need to take this further and do as per the above AND add a further element where columns H:J = Red OR Green (to provide the result of 5)
<tbody>
[TD="width: 100"]01/01/12[/TD]
[TD="width: 41"][/TD]
[TD="width: 100"]Fruit[/TD]
[TD="width: 96"]Apple[/TD]
[TD="width: 96"]Apple[/TD]
[TD="width: 96"]Pear[/TD]
[TD="width: 56"]Red[/TD]
[TD="width: 56"]Green[/TD]
[TD="width: 56"][/TD]
</tbody>
Any assistance would be much appreciated.
Thank you.
I am new to using Excel to this level and I am trying to do a complex count where there are a combination of AND and OR criteria.
I have managed similar things by using =count(if( and entering the formula as an array, however, this particular scenario seems to have too many variants. I have also tried using =sum and =sumproduct. I have achieved the first part of my query by using =sum but the formula is very long and messy - I'm sure there must be a better/easier way to achieve the result.
Using the example data in the table below, I am trying to achieve 2 different counts:-
Count where:-
Column A = 1 AND column D = Fruit AND Columns E-G = Apple OR Pear OR Orange OR Raspberry OR Lime OR Banana (the answer I'm looking for is 9)
I then need to take this further and do as per the above AND add a further element where columns H:J = Red OR Green (to provide the result of 5)
1 | |||||||||
1 | 02/01/12 | Vegetable | Leek | Cabbage | Potato | ||||
1 | 03/01/12 | Fruit | Apple | Apple | Apple | Green | Red | Green | |
1 | 04/01/12 | Fruit | Pear | Orange | Raspberry | ||||
2 | 05/02/12 | Fruit | Lime | Apple | Banana | Red | |||
2 | 06/02/12 | Fruit | Orange | Pear | Lemon | ||||
2 | 07/02/12 | Fruit | Apple | Orange | Banana | Red |
<tbody>
[TD="width: 100"]01/01/12[/TD]
[TD="width: 41"][/TD]
[TD="width: 100"]Fruit[/TD]
[TD="width: 96"]Apple[/TD]
[TD="width: 96"]Apple[/TD]
[TD="width: 96"]Pear[/TD]
[TD="width: 56"]Red[/TD]
[TD="width: 56"]Green[/TD]
[TD="width: 56"][/TD]
</tbody>
Any assistance would be much appreciated.
Thank you.