View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Lacy Lacy is offline
external usenet poster
 
Posts: 3
Default Counting Variables

I have a new problem now. I need to count to see how many
of each defect I have. For example:
Count
C143 Part off pad 5/26/04 1
C201 Solder Ball 6/7/04 1
C331 Part not placed 5/24/04 3
C331 Part not placed 5/24/04
C331 Part not placed 5/24/04
C331 Part off pad 5/24/04 1

All three criteria have to match to count it. But I want a
count for each defect. Then I want a Total # of defects.

Total = 0
Count = 1
For i = 3 To RowCount
If Defect(i, 10) = Defect(, 10) Then
If Defect(i, 11) = Defect(, 11) Then
If Defect(i, 11) = Defect(, 11) Then
Count = Count + 1
End If
End If
End If
Next i
Total = Total + Count

Thanks in advance,
Lacy