Reputation: 93
I have a specific and difficult task that I will explain further. I won't use VBAExcel since this is not the case:
Those numbers correspond to marks in different evaluations. In the first set there are 2 numbers and in the second 3 numbers. But the total number of evaluations are 4. How can I count them? Each evaluation contains "A" and "B" or only one of them because the total is 100. Only the 4th evaluation doesn't exist. I want to count the total number of evaluations for every situation.
Upvotes: 0
Views: 90
Reputation: 5902
You can use following formula.
=SUMPRODUCT(--((A6:E6+F6:J6)>0))
Adjust the ranges to suit actual columns
Upvotes: 0
Reputation: 1471
Not sure this is the best way but here are the steps I take:
split range
contains number into 2 parallel arrays with different color (yellow and blue)sum of pairs> 0
->> returns the result = 1, and the .
D8=SUMPRODUCT(--((OFFSET(A6:J6,,,1,5)+OFFSET(A6:J6,,5,1,5))>0))
Hope it works!
Upvotes: 3
Reputation: 69
As far as I understood your requirement you can use a helper row with some random indexes. Thus, even the 4th test where the result is empty will be counted and your number of evaluations will be 5.
Upvotes: 0