• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Count unique values among duplicates

Guys please help me getting count unique values among duplicates.

Column

1186MPYes

1002PBYes

1003PBYes

1004PBNo

1005PBNo

1007PBYes

1017PBYes

1020PBYes

1021PBYes

1022PBYes

1025PBYes

1031UPYes

1032PBYes

1038HRYes

1042HRYes

1043PBYes

1045PBYes

1046PBYes

1047PBYes

1049HRYes

1051HRYes

1052HRYes

1054RJYes

1057PBYes

1058PBYes

1059PBYes

1071PBYes

1072HRYes

1073PBYes

1074NDYes

1077NDYes

1078NDYes

1079PBYes

1081PBYes

1082UPYes

1087NDYes

1089HRYes

1091NDYes

1092PBYes

1094PBYes

1095HRYes

1099PBYes

1103HRYes

1104PBYes

1105UTYes

1106UTYes

1107NDYes

1108UPYes
 
Shasi


Firstly Welcome to the Chandoo.org forums


Name your data area Data

The array enter this anywhere

=SUM(1/COUNTIF(Data,Data)) Ctrl, Shift , Enter
 
Shasi,

Don't copy the formula down/across. It's a single-output formula, meant to give a unique count. The data you posted is all unique. What number were you expecting?
 
I don't want to be critical but there's a whole Column "State" you didn't tell us about?


Name the two sets of data, State and DD

Then use:

=SUMPRODUCT((State="PB")*(1/COUNTIF(DD,DD)))

or

=SUMPRODUCT((State=$D$2)*(1/COUNTIF(DD,DD)))

where the States initials are in D2
 
Hi Hui, All,


how can I use the formula:

=SUM(1/COUNTIF(Data,Data)) Ctrl, Shift , Enter


in a my defined name?


Regards,

Prasad DN
 
Got it :)


I have used sumproduct instead of sum. This is not CSE formula..


=SUMPRODUCT(1/COUNTIF(Data,Data))


Well, but for future reference, can defined names have CSE formulas ?


Please advise.


Regards,

Prasad DN
 
Hi, prasaddn!

Entered as an array formula, it gives you the number of different elements in range Data.

Entered as a normal formula, it gives you the percentage of occurrence of a certain value within its equals (that's to say 1/n, where n is the number of times that element appears).

Let Hui's correct me (once more time) if I'm wrong.

Regards!
 
Back
Top