Hi moose,
You want to count the number of distinct dates on for which there is at least one record for Bob, and to do the same type of count for each of the other individuals. The only unique dates on the table (and these are unique only within the context of column A of that table) are in Row 2 and Row 5. All other dates in the column occur at least twice.
This table uses an index column to hold the names to be counted. The highlighting isn't necessary; it's a visual check that I used to match the visual count with the calculated one in column G.
Two formulas are used, one to create the index values in column D, the other to perform the counts in column G.
D2: =IF(COUNTIFS(A$1:A2,A2,C$1:C2,C2)=1,C2,"")
COUNTIFs uses two test-values, condition pairs to determine the number of times this date-name pair has been entered up to this row in the table, and includes the row in the count only if both conditions return TRUE
- A$1:A2,A2: the date on the row (in the range A$1 to 'this row') is the same as the date in A2 ('this row of column A')
- C$1:C2,C2: the text on the row (in the range C$1 to 'this row') is the same as the text in C2 ('this row of column C')
The count is passed back to IF.
IF it is equal to 1, IF inserts the text (name) in 'this row' of column D, where it may later be counted.
IF the count is not 1, IF inserts a null string into 'this row' of column D.
The formula is filled down to the end of column D, and builds the list shown.
G5: =COUNTIFS(A,">="&G$2,A,"<="&G$3,D,"="&F5)
Here COUNTIFS uses three test-values, condition pairs. Again, all of these must return TRUE for a row to be included in the count.
- A,">="&G$2: The date in column A is on or after the date in cell G2
- A,"<="&G$3: The date in column A is on or before the date in cell G3
- D,"="&F5: The text (name) in column D is the same as the text (name) in F5 ('this row of column F')
The count is returned to the cell containing the formula.
The formula is filled town to the row containing the last name in the list of names in column F.
Further notes on COUNTIFS may be found in the Functions list, visible when = is entered in a cell on the table.
Regards,
Barry