HI
In a general module enter the following functions
Function inarow(rng As Range, aa) as boolean
inarow = False
Set wrkrng = rng.Resize(rng.Rows.Count - 9, 1)
For Each ce In wrkrng
If WorksheetFunction.CountIf(ce.Resize(9, 1), "<" & aa) = 9 Then inarow = True
If WorksheetFunction.CountIf(ce.Resize(9, 1), ">" & aa) = 9 Then inarow = True
Next ce
End Function
Function seesaw(rng As Range) As Boolean
seesaw = True
Set wrkrng = rng.Offset(1, 0).Resize(rng.Rows.Count - 2, 1)
For Each ce In wrkrng
If ce.Offset(-1, 0) > ce And ce.Offset(1, 0) < ce Then seesaw = False
If ce.Offset(-1, 0) < ce And ce.Offset(1, 0) > ce Then seesaw = False
Next ce
End Function
If your data is in the range F1:F200, and the mean is in D4 then your conditional formatting formula is:
=OR(inarow(F1:F200,D4),seesaw(F1:F200))
HTH
rylo
Bookmarks