I've seen many examples of questions on Stack Exchange and elsewhere around the web of people wanting to count distinct values in an Excel range using a formula. Newer versions of Excel have the DISTINCT
function but I'm not yet on Excel 2013.
This answer shows an elegant formula:
SUM(1/COUNTIF(range, range))
As an array formula, this counts the distinct values but will use Excel's default case-insensitive comparison. All the other examples that I've found (mostly variants on SUMPRODUCT
and COUNTIF
expressions) are also case-insensitive. Is there a simple way to use EXACT
or similar functionality within the COUNTIF
and force a case-sensitive unique count?