Hi,
You are welcome.
Though you did not ask for it, here is a brief explanation of the first formula:
It is a technique I learned from Lori.
=IF(LOOKUP(1,N(FIND(" "&MID(TRIM(A2), ROW(OFFSET(A$1,,,LEN(TRIM(A2)))), MMULT(FIND(" ",{""," "}&TRIM(A2)&" ",ROW(OFFSET(A$1,,,LEN(TRIM(A2))))),{1;-1}))&" ", " "&TRIM(A2)&" ")<ROW(OFFSET(A$1,,,LEN(TRIM(A2)))))),"Dupes", "No Dupes")
The right-most FIND finds the position of the space delimiters in the string, so as to determine the length of each substring. Since the second argument prefixes a blank and a space as a constant array, FIND returns a 2-dimensional array for the condition where the prefix is a blank and the condition where the prefix is a space. We then flatten it with MMULT to get a 1-dimensional array. The resulting array would have positive numbers indicating the length of the substring at that location in the string, and zero or negative numbers in all other cases.
We then pass the one-dimensional array to MID to create an array of substrings. MID will return an error for those positions in the array with zero or negative values.
Now we have the array of substrings.
Then, we locate the array of substrings in the main string (using the left-most FIND). Remember that each substring is at the same position in the original string. This allows us to compare the results from FIND with the corresponding position in the string. If the string is not a duplicate, the result from FIND should match the position in the string. If a duplicate is found, the second (and subsequent) duplicates will not match the position in the string. (i.e. for duplicates, FIND will return a value that points to the first/earlier instance found in the original string.)
if the result from the leftmost FIND does not match all of the corresponding positions in the string, we know we have duplicates in the source string. For every duplicate, we will get a TRUE. These TRUE/FALSE are converted to 1/0 using the N().
Since LOOKUP ignores error values, we can use it to lookup the value of 1, and return 1 if it is found. That gets fed to the IF statement, and we have our final results.
Of course, you can avoid the comparison to the position in the original string (and shorten the formula) using the MODE approach used in the second formula! But what is the fun in that?!!
Cheers,
Sajan.