In Excel, Judge Whether A Word Has Duplicate Letters

Judith-Excel-Sharing - Jun 20 - - Dev Community

Problem dscription & analysis:

In the following column, each cell contains a word and certain words have duplicate letters:

original table

If a word has duplicate letters, display NOGOOD in the right cell; if it hasn’t, display GOOD in the cell:

desired table

Solution:

Use SPL XLL to enter the following formula and drag it down:

=spl("=d=?.split(),if(d.icount()==d.count(),$[GOOD],$[NOGOOD])",A1)

Enter fullscreen mode Exit fullscreen mode

result table with code entered
Explanation:

split()function splits a string according to unique letters. icount() function counts unique letters in a word. count() function calculates the number of unique letters in all the words.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player