View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JP[_4_] JP[_4_] is offline
external usenet poster
 
Posts: 897
Default how to count only one instance of an item if multiple occurrences

Here is an array formula that will do this.

=SUM(IF(FREQUENCY(A2:A10,A2:A10)0,1))

Must be array-entered (Ctrl-Shift-Enter). Don't forget to replace
"A2:A10" with your actual range. This formula assumes that there are
only numbers in the range.

You could also used Advanced Filter (DataFilterAdvanced Filter) to
create a list of unique items to another column.

HTH,
JP


On Jan 15, 11:36*am, A Newton wrote:
Hello,

I have an Excel 2003 spreadsheet. In column C of one of the
worksheets, there are numbers. In some cases, the numbers are unique
and appear only once in the column. For example, the number 348975
appears only once in the column in cell C45. But in other cases, there
are multiple instances of the same number. For example, 123456 appears
in C1, C2, C3, and C4. And 789012 might appear in C10, C150, and C334.

I am hoping someone can help me with this problem. I want to count all
instances of unique numbers in column C AND only one instance of each
number that has multiple instances. In other words, using the numbers
I gave as examples above, I would want to get a result of "3" (a count
of 348975, 123456, and 780912) rather than "8" (a count of C45, C1,
C2, C3, C4, C10, C150, and C334).

One thought I had was to have another column (Q) in the worksheet that
could basically identify each unique number with the number "1" and
then number multiple instance. I could then count only the items with
"1" in column Q. For example

C1 * * * * *123456 * * * * *1
C2 * * * * *123456 * * * * *2
C3 * * * * *123456 * * * * *3
C4 * * * * *123456 * * * * *4
C10 * * * * 789012 * * * * 1
C45 * * * * 348975 * * * * 1
C150 * * * *789012 * * * * 2
C334 * * * *789012 * * * * 3

Thanks in advance for your time and help.