Function ZerosConsecutifs(r As Range, nref%, Optional adr As Boolean)
Dim c As Range, n%
For Each c In r
If CStr(c) = "0" Then
n = n + 1
Else
If n > nref Then
If adr Then
ZerosConsecutifs = ZerosConsecutifs & "," & c(1, 1 - n).Resize(, n).Address(0, 0)
Else
ZerosConsecutifs = ZerosConsecutifs + n
End If
End If
n = 0
End If
Next
If adr Then
If n > nref Then ZerosConsecutifs = ZerosConsecutifs & "," & r(r.Count + 1 - n).Resize(, n).Address(0, 0)
ZerosConsecutifs = Mid(ZerosConsecutifs, 2)
Else
If n > nref Then ZerosConsecutifs = ZerosConsecutifs + n
If ZerosConsecutifs = 0 Then ZerosConsecutifs = ""
End If
End Function
Function MFC(c As Range, a$) As Boolean
MFC = Not Intersect(c, c.Parent.Range(a)) Is Nothing
End Function