我有一个数据集,从12/1/2010
到12/1/2019
说“ ORANGE”。
A B C-FIND
1 org 12/01/2016 09/05/2018
2 org 08/05/2017
3 org 01/07/2018
4 org 12/03/2019
5 apple 11/03/2017
6 apple 9/9/2018
要查找:
查找给定日期前12个月的“ ORANGES”(数量),例如“ 09/05/2018(在单元格C1中提及)”。
这是我尝试过的:
=COUNTIFS($A$2:$A$12807,"ORANGES",$B$2:$B$12807,"<=" & C1)
答案 0 :(得分:0)
您需要将日期括起来:
=COUNTIFS($A$2:$A$12807,"ORANGES",$B$2:$B$12807,"<=" & C1,$B$2:$B$12807,">=" & DATE(YEAR(C1)-1,MONTH(C1),DAY(C1)))