Ok, I figured out what the problem was. See these screencaps:
http://img153.imageshack.us/img153/9568/uniquesdiverr2od.jpg
http://img186.imageshack.us/img186/5438/uniquesnoerr4zf.jpg
You'll notice in the first screencap the result of the formula is a #DIV/0!
error and in the 2nd screencap the result is correct.
Notice the range in the formula used in the first screencap and the range
used in the formula in the 2nd screencap. Although I don't know this to be
fact, I think this type of formula has a problem with the used range. I
mentioned this in a thread several months ago and Bob Phillips verified that
he also experienced this before.
In the first screencap the formula references exceed the current used range.
In the 2nd screencap I changed the references to be within the current used
range.
Try this test. I'm using Excel 2002 on WinXP (all updates current)
Open a *new fresh empty* workbook.
Enter this formula in B1:
=SUMPRODUCT((A1:A10<>"")/COUNTIF(A1:A10,A1:A10&""))
The result is 0 as you'd expect since the referenced range is empty.
Now, start entering data in A1 and on down one cell at a time.
The formula returns #DIV/0! until an entry is made in A10. This also sets
the used range referenced in the formula.
Now, if you clear the contents of the range and then start entering new data
the formula works as expected.
Another one of Excel's "features"!
So, your formula does in fact work and I like it!!!!!!!!!
Biff