View Single Post
  #2   Report Post  
Gary''s Student
 
Posts: n/a
Default Counting individual #s

Supose we start with:
1254
9521
7895
3574
1258
2210
First run text to columns to pick apart the individual digits, we see:
1254 1 2 5 4
9521 9 5 2 1
7895 7 8 9 5
3574 3 5 7 4
1258 1 2 5 8
2210 2 2 1 0
Next in cell F1 enter: =(B1=2)+(C1=2)+(D1=2)+(E1=2) and copy down
We now see:
1254 1 2 5 4 1
9521 9 5 2 1 1
7895 7 8 9 5 0
3574 3 5 7 4 0
1258 1 2 5 8 1
2210 2 2 1 0 2
Somewhere enter =SUM(F:F) and the result will be 5


--
Gary's Student


"Mike" wrote:

I need to count one number in a number sequence for cells a1:a20. Im trying
to count the number "2" in every cell, but every cell has 4 numbers. How do I
count only one of those numbers in every cell?