如何使用 Excel 或 Google 工作表 COUNTUNIQUEIFS,其中唯一单元格满足同一条件列中的两个条件

How to use Excel or Google Sheets COUNTUNIQUEIFS where the unique cell meets two conditions in same criteria column

我有一个通话记录,我想确定已接听和未接听的 唯一 来电者的数量。但是,如果来电者的状态为已接听和已接听,我希望它算作已接听,因为有人在某个时候与该来电者交谈过。我更喜欢 Google Sheets countuniqueifs,但 Excel 也可以。

我想要以下结果:

status # of unique callers
answered 3
unanswered 1 (excludes those with both answered and unanswered)

对于同时处于未接听和已接听状态的唯一来电者,我们希望将其视为已接听。

回答者:

=COUNTUNIQUE(FILTER(B2:B,COUNTIFS(C2:C,"answered",B2:B,B2:B)))

未回复者:

=COUNTUNIQUE(FILTER(B2:B,COUNTIFS(C2:C,"answered",B2:B,B2:B)=0))

或者更确切地说,只是从彼此中减去两个:

=COUNTUNIQUE(B2:B)-<OutcomeOfFirstFormula>)

用于回答:

=COUNTA(IFNA(QUERY(SORTN(SORT(B2:C, 2, 1), 9^9, 2, 1, 0), 
 "select Col1 where Col2 = 'answered'")))

未回答的:

=COUNTA(IFNA(QUERY(SORTN(SORT(B2:C, 2, 1), 9^9, 2, 1, 0), 
 "select Col1 where Col2 = 'unanswered'")))