Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub ColorTest()
Dim numRed As Integer
Dim numBlue As Integer
Dim numYellow As Integer
Dim c As Object
Dim TestRange As Range
numRed = 0
numBlue = 0
numYellow = 0
'Set your test range here
Set TestRange = ActiveSheet.Range("A1:D6")
For Each c In TestRange
If c.Characters.Font.ColorIndex = 3 Then
numRed = numRed + 1
Else
If c.Characters.Font.ColorIndex = 5 Then
numBlue = numBlue + 1
Else
If c.Characters.Font.ColorIndex = 6 Then
numYellow = numYellow + 1
End If
End If
End If
Next c
MsgBox "Red: " & numRed & " Blue: " & numBlue & " _
Yellow: " & numYellow
End Sub