I have a row of numbers as follows:
1 2 3 0 1 1 0 1 1 2 0 2 2 2 2 2 2 2 2 1 1 1 1 1 1
I have worked out the formula to identify the longest run of 0s: =MAX(FREQUENCY(IF(I2:AH2=0,COLUMN(I2:AH2)),IF(I2:AH2<>0,COLUMN(I2:AH2))))
I am trying to work out how I can use a similar formula to show the longest consecutive run of numbers which are 1 or above. In this case it should be 14. I'm sure it's just a simple amendment to the above but I've tried several ways to show greater than 1 but it doesn't seem to work!
Bookmarks