View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Count quantity of repeated items in a column

Let put the count only the first time the number is found. Assume the
numbers start in A1. Put this formula in B1 and then copy down Column B

=IF(COUNTIF(A$1:A1,A1)=1,COUNTIF($A:$A,A1),"")

Countif will count the numbe of times a number appears.

**** First Countif ******

COUNTIF(A$1:A1,A1)=1 - Notice the dollar sign in front of the 1. This
will fix the first cell of the range when you copy down column B

B1 = COUNTIF(A$1:A1,A1)=1
B2 = COUNTIF(A$1:A2,A2)=1
B3 = COUNTIF(A$1:A3,A3)=1
B4 = COUNTIF(A$1:A4,A4)=1
B5 = COUNTIF(A$1:A5,A5)=1

**** Second Countif ******

B1 = COUNTIF($A:$A,A1)
B2 = COUNTIF($A:$A,A2)
B3 = COUNTIF($A:$A,A3)
B4 = COUNTIF($A:$A,A4)
B5 = COUNTIF($A:$A,A5)

The 2nd Countif counts the number of times the number appears in Column A
($A:$A) where the 1st Countif counts only the number of times the number
appears in the rows equal or above where the formula occurs.

The test for equal one will only be true the first time a number appears in
column A

the IF statement works like this

=if(Condition,true,false)


In the formula the false is not display anything which is "" the two sets
of double quotes.


So the formula
"Susienak" wrote:

I have a list that contains numbers that repeat Example: 900,825,827,900,
765,827,765, 765, 902, 900, etcc... I want to know how many times each number
is repeated in that column. What function in Excel 2007 do I use so that I
know 900 was repeated 340 times and 825 was repeated 23 times. There are
thousands of numbers repeated thousands of times so how do I found out how
many times each number is repeated? Can someone explain this step by step
because Im new to Excel...

Thanks,

Susan