View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default how to make excel simply count red x's?

In case you have not found a solution, try this one. You will have to re-set
the range parameters to meet your requirements.

Sub redX()
Dim i
A = 0
For Each i In Range("A1:C6").Cells
If i.Value = "x" And i.Font.ColorIndex = 3 Then
A = A + 1
End If
Next i
MsgBox "The count is " & A
End Sub

" wrote:

I just need excel to simply count the red x's in my document. It will
simplify all kinds of work. I have tried:
=SUMPRODUCT(--(ColorIndex(A1:A100,TRUE)=3)) , but i keep getting a name
error. When i change SUMPRODUCT to COUNT i dont get the name error but
it shows 0. Are there any simple solutions to this? I dont have the
time to get into visual basic either.