View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Fred Smith[_4_] Fred Smith[_4_] is offline
external usenet poster
 
Posts: 2,389
Default how do I Count repeating numbers in the previous column?

You want Countif. In b1, put:
=countif(a:a,a1)
Copy down to the end of column A (you can do this by double-clicking on the
fill handle).

If you want the entry in column B to appear only when there's a change in
column A, use something like:
=if(a1=a2,"",countif(a:a,a1))

Regards,
Fred

"Texas Nuckols" wrote in message
...
I have this set up:

Market Count
1501
1501
1501
1501
1501 5
1506
1506
1506 3
1507
1507
1507 3

I did this manually for a file of over 1000 lines. Now I need to do the
same thing for a file of 5000 lines. The file is sorted by "Market". I
just
need to create a formula that will Count the numbers repeated in column A
and
put the answer in column B. Can you help?