Home > Back-end >  Counting Max Consecutive Zero Values - trying not to count blank cells but ISNUMBER isn't worki
Counting Max Consecutive Zero Values - trying not to count blank cells but ISNUMBER isn't worki

Time:01-23

I am trying to count the max number of times zero appears in a row. This formula works for that, however it is including blank cells as zeros. I am trying to avoid that by using ISNUMBER, but when I include ISNUMBER the formula returns 0, which is incorrect. Can anyone help?

Thanks so much!

=MAX(FREQUENCY(IF(H3:AL3=0, COLUMN(H3:AL3)), IF(H3:AL3<>0, COLUMN(H3:AL3))))

CodePudding user response:

Try to add IF() ISNUMBER() to your formula in ignore blank cells, as in :

=MAX(FREQUENCY(IF(IF(ISNUMBER(H3:AL3),H3:AL3,"")=0,COLUMN(H3:AL3)),IF(IF(ISNUMBER(H3:AL3),H3:AL3,"")<>0,COLUMN(H3:AL3))))

This is an array (CSE) formula, confirmed by pressing "Ctrl Shift Enter" to entry.

  •  Tags:  
  • Related