title: Counting Font color in Excel
body: <p>I am trying to count the number of cells that have a blue font and It won't work. I can count cells with a red font but not blue. This is a custom function I have created using VBA</p>
  
  <pre><code>Function GetFontColorCount(CountRange As Range, CountColor As Range)
      Dim CountColorValue As Integer
      Dim TotalCount As Integer
      CountColorValue = CountColor.Font.Color
      Set rCell = CountRange
      For Each rCell In CountRange
          If rCell.Font.Color = CountColorValue And rCell.Value &gt;= 1 Then
              TotalCount = TotalCount + 1
          End If   
      Next rCell
      GetFontColorCount = TotalCount
  End Function
  </code></pre>
  
  <p>When using the formula It will count red font and black but not blue or any of the other colors that I have tried.</p>