Aladin,
Yes, I have non-numbers, nulls or blanks. So I am using your formula.
Please, Can I also get the no. of 'unique appearances'?
for 40, 50, 60, 50, 60, 40, 40
Answer=3
Part B) Also how to accomplish:
40 3
50 2
60 2
[TABLE="width: 335"]
<colgroup><col style="width: 48pt;" span="2" width="64"> <col style="width: 109pt; mso-width-source: userset; mso-width-alt: 5176;" width="146"> <col style="width: 130pt; mso-width-source: userset; mso-width-alt: 6172;" width="174"> <tbody>[TR]
[TD="class: xl63, width: 64, bgcolor: transparent, align: right"]
40[/TD]
[TD="class: xl63, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl64, width: 146, bgcolor: transparent"]
Unique Sum[/TD]
[TD="class: xl64, width: 174, bgcolor: transparent"]
Unique Count[/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent, align: right"]
50[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent, align: right"]
150[/TD]
[TD="class: xl63, bgcolor: transparent, align: right"]
3[/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent, align: right"]
60[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"]
Unique List[/TD]
[TD="class: xl64, bgcolor: transparent"]
Occurrence Frequency[/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent, align: right"]
50[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent, align: right"]
40[/TD]
[TD="class: xl63, bgcolor: transparent, align: right"]
3[/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent, align: right"]
50[/TD]
[TD="class: xl63, bgcolor: transparent, align: right"]
2[/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent, align: right"]
60[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent, align: right"]
60[/TD]
[TD="class: xl63, bgcolor: transparent, align: right"]
2[/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent, align: right"]
40[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent, align: right"]
40[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[/TR]
</tbody>[/TABLE]
The data is C5:C9999 on Sheet1 (Adjust to suit if necessary).
Define
Ivec (of Integer Vector) using Insert | Name | Define or Formulas | Name Manager as referring to:
Rich (BB code):
=ROW(Sheet1!$C$5:$C$9999)-ROW(Sheet1!$C$5)+1
E5, control+shift+enter, not just enter:
Rich (BB code):
=SUM(IF(FREQUENCY(IF(ISNUMBER(C5:C9999),MATCH(C5:C9999,C5:C9999,0)),Ivec),C5:C9999))
This sums the distinct (unique) numbers in the target range.
F5, control+shift+enter, not just enter:
Rich (BB code):
=SUM(IF(FREQUENCY(IF(ISNUMBER(C5:C9999),MATCH(C5:C9999,C5:C9999,0)),Ivec),1))
If we want to count any distinct value, numeric or text, we change the ISNUMBER bit:
Rich (BB code):
=SUM(IF(FREQUENCY(IF(C5:C9999<>"",MATCH(C5:C9999,C5:C9999,0)),Ivec),1))
E8, control+shift+enter and copy down:
Rich (BB code):
=IF(ROWS($E$3:E3)<=$F$6,INDEX($C$5:$C$9999,
SMALL(IF(FREQUENCY(IF(ISNUMBER($C$5:$C$9999),MATCH($C$5:$C$9999,$C$5:$C$9999,0)),
Ivec),Ivec),ROWS($E$3:E3))),"")
If we want to list any distinct value, numeric or text, we replace the ISNUMBER bit...
Rich (BB code):
=IF(ROWS($E$3:E3)<=$F$6,INDEX($C$5:$C$9999,
SMALL(IF(FREQUENCY(IF($C$5:$C$9999<>"",MATCH($C$5:$C$9999,$C$5:$C$9999,0)),
Ivec),Ivec),ROWS($E$3:E3))),"")
F8, just enter and copy down:
Rich (BB code):
=IF($E8="","",COUNTIF($C$5:$C$9999,$E8))