Hi All, I have a problem which you may be able to help me with, the code below is part of a macro which sorts staff available on a given day in a roster, it is designed to ensure that I don't have someone on leave and on duty at he same time etc. However when I run the macro all blank cells in the range are identified as duplicates. Is there a way to eliminate blanks from the conditional formatting? Any suggestions would be welcome. Thanks in advance. Ed
Range("B7:P62").Select
Application.CutCopyMode = False
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=COUNTIF($B$7:$P$62,B7)>1"
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = False
.Strikethrough = True
.ColorIndex = 3
End With
Selection.FormatConditions(1).Interior.ColorIndex = 4
Range("B5:P6,B24:E24,E33,F5:F41,G27:P29,D43:D62,K56:K58,M43:N58,M60:N62,E21:E23,G19:O19,G23:O23,G28:O29,G37:O37,A40:P42,F43:F62,H56:I57,G55:I55,G59:I59,J49,L55,L59,O45,O48,O51,O55,O59,P9:P27,P31:P62").Select
Selection.FormatConditions.Delete
Bookmarks