我正在使用Google表格,并试图让这个公式为我提供以下计数:
当列T = Kenneth
并且列U =(Pending
或Contacted
)时计数,而列W的日期介于B14和B15中显示的日期之间。
这是我到目前为止所做的:
=sum(countifs(Users!$T:$T,"Kenneth",Users!$U:$U,{"Pending","Contacted"},Users!$W:$W,">"&$B14,Users!$W:$W,"<="&$B15))
这给了我Pending
单独的正确计数,但它忽略了所有Contacted
行,所以不知道它是不识别OR运算符。
答案 0 :(得分:1)
COUNTIFS(和SUMIFS)不支持条件的数组参数。您需要求助于COUNTIFS的总结:
=COUNTIFS(Users!$T:$T,"Kenneth",Users!$U:$U,"Pending",Users!$W:$W,">"&$B14,Users!$W:$W,"<="&$B15)+COUNTIFS(Users!$T:$T,"Kenneth",Users!$U:$U,"Contacted",Users!$W:$W,">"&$B14,Users!$W:$W,"<="&$B15)
或其他方法,例如:
=COUNTIF(FILTER(Users!$T:$T,(Users!$U:$U="Pending")+(Users!$U:$U="Contacted"),Users!$W:$W>$B14,Users!$W:$W<=$B15),"Kenneth")
答案 1 :(得分:0)