In Excel, judge whether a word has duplicate letters

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


A

1

chipmunk

2

colonize

3

whennever

4

when

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


A

B

1

chipmunk

GOOD

2

colonize

NOGOOD

3

whennever

NOGOOD

4

when

GOOD

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

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

Picture2png

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.

Source:https://www.reddit.com/r/excel/comments/1d4sf30/how_do_i_use_excel_to_check_if_a_string_contains/