When counting unique values in Microsoft Excel, use UNIQUE() as a helper function and avoid more complicated expressions. The TechRepublic article How to create a sorted unique list in an Excel ...
Turns out half my old formulas were just dynamic arrays in disguise, written the long way.
In addition to the new SORT function, you may also find the new FILTER and UNIQUE array functions useful. For example, the worksheet on the next page contains a detailed listing of invoices in columns ...