我正在尝试根据状态(“已结算”)和不同的代码,每月 获取条目的总数数量。如果该代码中其他条目的其他状态尚未确定,则不应计入。请参见下面的示例以及预期的输出。
MONTH |CODE |CONTRIBUTION|STATUS
JANUARY |CS-111|500 |Settled
JANUARY |CS-111|500 |Settled
FEBRUARY|CS-131|200 |Settled
FEBRUARY|CS-131|200 |Waiting
FEBRUARY|CS-141|300 |Settled
MARCH |CS-151|400 |Waiting
MARCH |CS-161|700 |Settled
示例输出:
January | 1 | 1 because same code and status
February | 1 | 1 because only CS-141 is settled, the second entry of CS-131 is Waiting
March | 1 | 1 because only CS-161 is settled
这是我基于this问题的公式:
=SUMPRODUCT(--($A$2:$A$8="January"),--(COUNTIFS($A$2:$A$8,$A$2:$A$8,$B$2:$B$8,$B$2:$B$8,$D$2:$D$8,"Settled")=0))
使用上面的公式,我得到2作为1月的输出,而不是1。1,因为它们具有相同的代码和状态。您能否帮助我应采用哪种概念来获得预期的输出?希望我的问题清楚。非常感谢。
很抱歉是否曾经问过这个问题。