Hi as per below macro its considering blacnk cells also now.Now i want to include it should not consider that blank cells.It should not mark that blank cells.How to include? anybody help me please?


Public Sub MarkDuplicates()
Dim iWarnColor As Integer
Dim rng As Range
Dim rngCell As Variant
Set rng = Range("A1:Z500") ' area to check '
iWarnColor = xlThemeColorAccent3
For Each rngCell In rng.Cells
    vVal = rngCell.Text
    If (WorksheetFunction.CountIf(rng, vVal) = 1) Then
        rngCell.Interior.Pattern = xlNone
    Else
        rngCell.Interior.ColorIndex = iWarnColor
    End If
Next rngCell
End Sub