title: How can I count the number of cells that are NOT formatted by conditional formatting using Excel VBA?
body: <p>I am really new at excel vba and I need help with this.</p>
  
  <p>I have a range (A2:A22) in a worksheet ("Numbers") that has been conditionally formatted (Bottom 30%) to have a background fill of a color (ThemeColor = xlThemeColorDark1).</p>
  
  <p>In my column, there are cells that have met the format condition and have a background fill color. The others have no fill.</p>
  
  <p>On a macro I'm trying to build, I want to count the number of cells in the range that has NOT been formatted with the fill.</p>
  
  <p>I've displayed the count in Cell B2, but it's returning 0.</p>
  
  <pre><code>Dim numberRange As Range, r As Long, count As Integer
  Set numberRange = Worksheets("Numbers").Range("A2:A22")
  
  count = 0    
  For r = 1 To numberRange.Rows.Count
      If Not numberRange(r, 1).FormatConditions(1).Interior.ThemeColor = _
          xlThemeColorDark1 Then count = count + 1
  Next r
  
  Worksheets("Numbers").Range("B2").Value = count
  </code></pre>
  
  <p>I've looked on forums everywhere, and maybe I'm not seeing the obvious. Please help. Thanks!</p>