Archive of Mr Excel Message Board
aa
aa
bb
bb
cc
cc
Would = 3 (Only 3 occurrancs of the same string)
Thanks

Chip Pearson's page has some good formulas to help with this:
http://www.cpearson.com/excel/duplicat.htm#CountingUnique
In general, you can use the following array
formula: (use control-shift-enter to enter it)
=SUM(IF(FREQUENCY(IF(LEN(Range1)>0,MATCH(Range1,Range1,0),""),
IF(LEN(Range1)>0,MATCH(Range1,Range1,0),""))>0,1))
If there are no blanks, you can use the
following array formula:
=SUM(1/COUNTIF(Range1,Range1))
Of course, substitute your range for Range1
in either formula.
HTH

Thats great thanks. But what is ctrl+shift+enter actually doing??
Regards

Control-shift-enter tells Excel that you're
entering an array formula--something that passes
a whole range to a function that normally
takes only one cell as an argument. For example,
in the first formula, the C-S-E entry forces
Excel to pass each cell in Range1 through the
formula.
Check out the Mr. Excel tip archive for more
about this.
HTH

I use this technique to isolate an individual list of values in a list of multiple recurring values by using COPY - PASTE SPECIAL (VALUES) and then sorting by the results of the IF statement.
Hope this helps
Doug
