• 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 text values

Pinang

Member
Hi,

I am trying to achieve below result with count if formula but its not working for me. could you please help.

below is result.


NameCount result
A
1​
B
2​
C
3​
D
4​
A
1​
B
2​
E
5​
 
Try,

In B2, formula copied down:

=IF(ISNUMBER(MATCH(A2,A$1:A1,0)),IFERROR(VLOOKUP(A2,A$1:B1,2,0),1),SUMPRODUCT(1/COUNTIF(A$2:A2,A$2:A2)))

or,

=IF(ISNA(MATCH(A2,A$1:A1,0)),SUMPRODUCT(1/COUNTIF(A$2:A2,A$2:A2)),IFERROR(VLOOKUP(A2,A$1:B1,2,0),1))

82617
 
Back
Top