I am using an Excel formula for counting unique text values:
=SUM(IF(FREQUENCY(COUNTIF(Colors,"<"&Colors),COUNTIF(Colors,"<"&Colors)),1))
I got it from this SO post.
I wonder if it's possible to make a user defined function(UDF) for this formula...
I've tried some functions, but I've always failed till now... :-)