You are on page 1of 1

Function ContarColor(range_data As Range, texto As String, criteria As Range) As

Integer
Dim datax As Range
Dim xcolor As Integer
xcolor = criteria.Interior.ColorIndex
For Each datax In range_data
If ((UCase(datax.Value) = UCase(texto)) Or (texto = "")) And (datax.Interior
.ColorIndex = xcolor) Then
ContarColor = ContarColor + 1
End If
Next datax
End Function

You might also like