Private [COLOR="Navy"]Sub[/COLOR] Worksheet_Change(ByVal Target [COLOR="Navy"]As[/COLOR] Range)
[COLOR="Navy"]Dim[/COLOR] oVal [COLOR="Navy"]As[/COLOR] Variant, Rng [COLOR="Navy"]As[/COLOR] Range, dn [COLOR="Navy"]As[/COLOR] Range, n [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long,[/COLOR] Dic [COLOR="Navy"]As[/COLOR] Object, c [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long[/COLOR]
[COLOR="Navy"]Set[/COLOR] Dic = CreateObject("scripting.dictionary")
[COLOR="Navy"]With[/COLOR] Dic
.Add "X", "": .Add "x", "": .Add 2, "": .Add 3, "": .Add 4, "": .Add 5, ""
[COLOR="Navy"]End[/COLOR] With
Application.EnableEvents = False
[COLOR="Navy"]If[/COLOR] Not Intersect(Range("F18:AU34"), Target) [COLOR="Navy"]Is[/COLOR] Nothing [COLOR="Navy"]Then[/COLOR]
[COLOR="Navy"]Set[/COLOR] Rng = Intersect(Range("F18:AU34"), Range(Cells(18, Target.Column), Cells(34, Target.Column)))
[COLOR="Navy"]For[/COLOR] [COLOR="Navy"]Each[/COLOR] dn [COLOR="Navy"]In[/COLOR] Rng
[COLOR="Navy"]If[/COLOR] Dic.Exists(dn.Value) [COLOR="Navy"]Then[/COLOR] c = c + 1
[COLOR="Navy"]If[/COLOR] c > 1 [COLOR="Navy"]Then[/COLOR] Target.Value = "": [COLOR="Navy"]Exit[/COLOR] For
[COLOR="Navy"]Next[/COLOR] dn
[COLOR="Navy"]End[/COLOR] If
Application.EnableEvents = True
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]