the row() component is a function (confusing, I guess, given my use of 'range' as well):
=max(frequency(if(F2:X2="DNS",row(F2:X2)),if(F2:X2<>"DNS",row(F2:X2))))
Example below.
The yellow text indicates the longest consecutive streak that doesn't include DNS or -, and the total is indicated in red text. The red text is what I need to automate.
Hhhmmm...
That's feels like it's going to bit a bit harder (i.e. not just a simple or() check for either string).
Not going to have much time over next week or so, so I'll see if I can solicit some help...
=MAX(FREQUENCY(IF(1-((F2:X2="DNS")+(F2:X2="-")),COLUMN(F2:X2)),
IF((F2:X2="DNS")+(F2:X2="-"),COLUMN(F2:X2))))