I need to count the number of rows in an array that contains at least one value larger than zero. How would I go about it?
I have data in the following format, where the data is filtered by dates. Therefore it happens that some columns will become all blank, just like "sixth value" here.
Category | first value | second value | third value | fourth value | fifth value | sixth value |
---|---|---|---|---|---|---|
Apple | 2 | 1 | 0 | 2 | ||
Banana | 0 | 0 | 0 | 0 | 0 | |
Orange | 1 | 3 | 2 | 4 | 1 | |
Melon | 1 | 2 | 2 |
The desired outcome here would be: 3
CodePudding user response:
try this out:
=COUNTIF(BYROW(B2:G,LAMBDA(bgx,SUM(bgx))),">0")