'Excel formula to count non empty cells in a column for distinct values in an other column
I have a list of members in Excel with their date of deaths (date of death not populated, if member is still alive). For one member there can be more lines because there can be more benefit lines associated. I would like to count the number of distinct members who are dead. An example of my list
As a result, I would like to get 2, the count of distinct dead members in my list.
Solution 1:[1]
Excel 2021 supports the dynamic array functions.
You can compose FILTER, UNIQUE and COUNT functions.
IF your IDs are in column A and the dates are in column B.
FILTERout items in column A, when the column B is Truthy (non-empty).- Apply the
UNIQUEfunction. - Apply the
COUNTfunction.
The following formula will produce the count of unique IDs with non-empty dates:
=COUNT(UNIQUE(FILTER(A:A,B:B)))
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | ru13r |
