1

I have a column with strings. I only want to count the strings which are unique.

I know that I could just derive all distinct strings(by pasting them) and then count them with =Count(...). However I do not want to destroy my dataset. Therefore, is there a formula for counting only unique strings?

I really appreciate your answer!

1 Answer 1

4

Try this one:

=SUMPRODUCT(1*(COUNTIF(A1:A10,A1:A10)=1))

In picture below unique values highlighted with blue:

enter image description here

Sign up to request clarification or add additional context in comments.

2 Comments

Thx for your answer! Why are you taking 1* in your formula?
it's a special trick: COUNTIF(A1:A10,A1:A10)=1 returns true/false array: {FALSE,FALSE,TRUE,FAlSE,...} (sumproduct can't sum this array) and 1*{FALSE,FALSE,TRUE,FAlSE,...} converts this array to number array: {0,0,1,0,...}. Alternatively you could use 1) =SUMPRODUCT(0+(COUNTIF(A1:A10,A1:A10)=1)) 2) =SUMPRODUCT(--(COUNTIF(A1:A10,A1:A10)=1))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.