title: Excel VBA Function to Return True or False based on Cell Background Colors in a Range
body: <p>I keep a spreadsheet of my timeline at work and when I meet and expect to meet certain milestones. The data (dates) is stored left-to-right and each project has it's own row. The milestones are permantely set and occupy Range(O:AA). My data is color coded as Green (Complete), Orange(Deadline), Blue(Not working on), Red(Not applicable).</p>
  
  <p>What I would like to do is write a function that would check if a cell contained an orange color background(Color index 6) and return a TRUE or FALSE based on that. Basically I want to aggregate all of the deadlines across all of the columns. Eventually I would like to integrate a date check as well so I can see which deadlines are approaching.</p>
  
  <pre><code>Function ScanForColor(Dates As Range) as Boolean
      If ScanForColor.Interior.ColorIndex = 6 Then
          ScanForColor = True
      Else
          ScanForColor = False
  End Function
  </code></pre>
  
  <p>I would like to call the function in a cell like =ScanForColor(O3:AA3) and I will have the ScanForColor function in column AB to hold the values for filtering the document.</p>