Calculate the number of unique characters that are common to two strings.
strings like .
String1 String2 UniqueCount
Ridiculous Simple 3
Incredible Silly 2
Magic Fun 0
Balloon Children 2
November December 4
January August 2
February January 4
United States India 4
Australia United Kingdom 3
Indomitable submissive 4
Hippopotamus
As an example, the string "Ridiculous" and "Simple" have the letters "s", "i" and "l" in common. As such, the expected output will be 3.
Happy Learning Enjoy !!
Rakesh Sharma
Hi,
Assume that "Ridiculous" is in A2 and "Simple" is in B2
Now put the below array formula in C2 and drag it down.
COUNT(MATCH(ROW($A$1:INDEX(A:A,LEN(A2))),SEARCH(MID(B2,ROW($A$1:INDEX(A:A,LEN(B2))),1),A2),0))
Acknowledge the above formula using CRTL + SHIFT + ENTER