title: delete all cells of a certain color
body: <p>This seems relatively simple and as I understand, it is possible. But I can't seem to figure it out or find exactly what I am looking for on the internet.</p>
  
  <p>I have some excel data in column A and some of the data is blue (0,0,255), some is red (255,255,255), some is green (0, 140, 0). I want to delete all blue data.</p>
  
  <p>I was told that:</p>
  
  <pre><code>Sub test2()
      Range("A2").DisplayFormat.Font.Color
  End Sub
  </code></pre>
  
  <p>Would give me the colors... but when I run that it says invalid use of the property and highlights .color</p>
  
  <p>Instead I clicked on the:
      Font color drop down
          then more colors
              then custom colors
                  then I can see that the data in blue is at (0,0,255)</p>
  
  <p>So then I tried:</p>
  
  <pre><code>Sub test()
  
  Dim wbk As Workbook
  Dim ws As Worksheet
  Dim i As Integer
  Set wbk = ThisWorkbook
  Set ws = wbk.Sheets(1)
  
  Dim cell As Range
  
  With ws
      For Each cell In ws.Range("A:A").Cells
          'cell.Value = "'" &amp; cell.Value
          For i = 1 To Len(cell)
              If cell.Characters(i, 1).Font.Color = RGB(0, 0, 255) Then
                  If Len(cell) &gt; 0 Then
                      cell.Characters(i, 1).Delete
                  End If
                  If Len(cell) &gt; 0 Then
                      i = i - 1
                  End If
              End If
          Next i
      Next cell
  End With
  
  End Sub
  </code></pre>
  
  <p>I found this on the web as a solution in several places but when I run it, nothing seems to happen.</p>