Function CountColor(col As Range, countrange As Range) As Integer Dim icell As Range Application.Volatile For Each icell In countrange If icell.Interior.ColorIndex = col.Interior.ColorIndex Then CountColor = CountColor + 1 End If Next icell End Function