In cell B5 I have a formula:
If column A has the data as shown below, the formula returns the correct answer of 3, because there are three values which have more than one occurrence (14, 16 and 17). This is exactly what I want to know; that there are three values which appear more than once. I needn't know what the values are, nor where they are (although I do have a nifty bit for that last part).
Column A: 12 13 14 14 14 15 16 16 17 17
However, if anywhere in the range of A2:A10 is a blank cell, then the count of duplicate values if decremented by 1 (in the example above, the formula would return 2, when it should be 3) In my sample below, blank cell is represented by "B".
Column A: 12 13 14 B 14 15 16 16 17 17
In this example, 14, 16 and 17 still each occur more than one time; so the formula should return 3, but it returns 2.
I'm fairly certain this is due to the first portion
=SUMPRODUCT((A2:A10<>"") Where it's counting essentially non-empty cells. Of course, if there happens to be two (or more) blank cells, than it re-increments, but this isn't really right either, because it's still omitting a non-blank duplicate (if that makes any sense at all).