View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Count if problems

Based on your posted sample where the numbers are only 1, 2 or 3.

=SUMPRODUCT(LEN(A2:A15)-LEN(SUBSTITUTE(A2:A15,1,"")))

Note that this won't work if you want to count 1s and have numbers like: 10,
11, 21, 101, etc.

--
Biff
Microsoft Excel MVP


"mjlunt" wrote in message
...
I am trying to count the number of cells that contain the number 1 within
the
data below. The formula that I am using is =COUNTIF(A1:A14,"1"). With this
formula the value returned to me is 2 however it should be 5. Please
Help!!


2,3
2
2
1,2,3
3
2
2,3
1,2
2
1,2
3
1
1
2