Another Option:-
This code will work for any column (Except "A") from row 4 down, when the value is "W".
Consecutive count >6<9 = yellow, > 9 red.
To install code , Right click sheet tab, select "View Code" (from drop down,)
Vbwindow appears, Paste code into Vbwindow.
Close Vbwindow.
Code runs when a "W" is inserted in any column > "A"
when Consecutive cells count are >6, then cells are Highlighted.
Code:
Private [COLOR="Navy"]Sub[/COLOR] Worksheet_Change(ByVal Target [COLOR="Navy"]As[/COLOR] Range)
[COLOR="Navy"]Dim[/COLOR] Rng [COLOR="Navy"]As[/COLOR] Range, Dn [COLOR="Navy"]As[/COLOR] Range, nRng [COLOR="Navy"]As[/COLOR] Range
[COLOR="Navy"]Set[/COLOR] Rng = Range(Cells(4, Target.Column), Cells(Rows.Count, Target.Column).End(xlUp))
Rng.Interior.ColorIndex = xlNone
[COLOR="Navy"]If[/COLOR] Not Intersect(Target, Rng) [COLOR="Navy"]Is[/COLOR] Nothing And Target.Count = 1 [COLOR="Navy"]Then[/COLOR]
[COLOR="Navy"]For[/COLOR] [COLOR="Navy"]Each[/COLOR] Dn [COLOR="Navy"]In[/COLOR] Rng
[COLOR="Navy"]If[/COLOR] UCase(Dn.Value) = "W" [COLOR="Navy"]Then[/COLOR]
[COLOR="Navy"]If[/COLOR] nRng [COLOR="Navy"]Is[/COLOR] Nothing [COLOR="Navy"]Then[/COLOR]
[COLOR="Navy"]Set[/COLOR] nRng = Dn
[COLOR="Navy"]Else[/COLOR]
[COLOR="Navy"]Set[/COLOR] nRng = Union(nRng, Dn)
[COLOR="Navy"]End[/COLOR] If
[COLOR="Navy"]End[/COLOR] If
[COLOR="Navy"]Next[/COLOR] Dn
[COLOR="Navy"]If[/COLOR] Not nRng [COLOR="Navy"]Is[/COLOR] Nothing [COLOR="Navy"]Then[/COLOR]
[COLOR="Navy"]For[/COLOR] [COLOR="Navy"]Each[/COLOR] Dn [COLOR="Navy"]In[/COLOR] nRng.Areas
[COLOR="Navy"]If[/COLOR] Dn.Count > 6 And Dn.Count < 9 [COLOR="Navy"]Then[/COLOR]
Dn.Interior.Color = vbYellow
[COLOR="Navy"]ElseIf[/COLOR] Dn.Count >= 9 [COLOR="Navy"]Then[/COLOR]
Dn.Interior.Color = vbRed
[COLOR="Navy"]End[/COLOR] If
[COLOR="Navy"]Next[/COLOR] Dn
[COLOR="Navy"]End[/COLOR] If
[COLOR="Navy"]End[/COLOR] If
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick