COUNTIF formula: count all until……

=IF(COUNTIF(AI7:BH7,”<0″),COUNTIF(AI7:INDEX(AI7:BH7,MATCH(TRUE,AI7:BH7=”<0″,0)),”>=0″),COUNTIF(AI7:BH7,”>=0″))

This is my current formula.

The aim of it to to count all positive numbers between the range AI7:BH7, until you meet the first negative number within the range, and then i don’t want to count anymore. ie count the first chain of positive numbers within a range. This formula appears to work until the first number within the range is a negative or a zero. In such case #N/A appears. How can i adpt this formula to count the first positive chain of numbers within a range of data.

Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *