View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Counting numbers in a series

In cell E1 put this formula and copy down the column

=COUNTIF(A1:D1,1)

"Jack" wrote:

Hi Everyone

I have a problem that's driving me crazy.

Say this is my data set

Row 1: 1 2 3 4
Row 2: 2 5 6 1
Row 3: 2 4 1 8
Row 4: 2 3 6 7

I want to find how many times the numbers 1 and 2 appear in each row. In
the dataset above, the answer would be 3 (i.e. rows 1, 2 and 3). In my real
dataset, I have 1090 rows. Anyone got any ideas???