使用vlookup作为Countifs内部的标准
经过多年使用这个社区,我有一个无法找到答案的问题。希望大家能提供帮助!
我试图计算每个人逾期的“接地”项目数量。我的屏幕截图( count tracker )显示了我正在使用的内容的非常简洁的版本。列AC是我的大(15,000行)数据字段,它是从外部源导入的。在GH列中,我列出了每个可能的任务(约100行)和类型(接地和非接地以及许多其他任务)。 F列是我试图获得计数的地方。
我在F9中的公式当前使用countifs来获取等于E9(在这种情况下为“ smith”)的大数组中的实例,而大数组中的截止日期小于或等于F8中的当前日期。我不知道的是如何添加以计算大数组中的任务,其中H列中的任务类型等于“接地”。我尝试了Vlookup,但似乎不喜欢它,并告诉我该公式存在问题。它不起作用,但这是我所追求的一般想法:
=COUNTIFS($A$2:$A$7,$E9,$C$2:$C$7,"<="&$F$8,VLOOKUP($B$2:$B$7,$G$2:$H$4,2,FALSE),"=Grounded")
凭借目前的数据,史密斯的数量应该为1,而琼斯的数量应该为0。我有一种感觉比我要做的简单,但我无法弄清楚。我正在使用Excel 2016。
希望我对问题解释得很好。谢谢您的帮助。
After years of using this community, I have a question that I can't find an answer to. I hope you all can help!
I am trying to get a count of the number of "Grounded" items that each individual is overdue for. My screenshot (Count Tracker) shows a very condensed version of what I'm working with. Columns A-C is my large (15,000 rows) data field that is imported from an external source. In columns G-H I have listed each possible task (about 100 rows) and the type (Grounded and Non-Grounding plus many others). Column F is where I am trying to get the count.
My formula in F9 currently uses COUNTIFS to get a count of the instances in the large array that equal E9 ("Smith" in this case) and where the due date in the large array is less than or equal to the current date in F8. What I can't figure out is how to also add to count the Tasks in the large array where the task type in Column H equals "Grounded". I tried VLOOKUP, but it seems it doesn't like it and tells me there is a problem with the formula. It doesn't work, but here's the general idea of what I'm after:
=COUNTIFS($A$2:$A$7,$E9,$C$2:$C$7,"<="&$F$8,VLOOKUP($B$2:$B$7,$G$2:$H$4,2,FALSE),"=Grounded")
With how the data is currently presented, Smith should have a count of 1 and Jones should have a count of 0. I have a feeling that this is more simple than I'm making it to be, but I can't figure it out. I am using Excel 2016.
Hopefully I explained the problem well enough. Thank you for your assistance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用Excel 2016,我会说
mmult()
在这里是一个很好的选择:< img src =“ https://i.sstatic.net/fccij.png” alt =“在此处输入图像说明”>
f9
中的cse-formula:With Excel 2016 I'd say
MMULT()
is a good alternative here:CSE-Formula in
F9
:您可以添加第四列存储该任务是否扎根于
D2的公式将是:
修改您的Countifs公式以将此新列用作标准
You could add a fourth column that stores whether that Task is Grounded
The formula for D2 would then be:
Modify your CountIfs formula to use this new column as a criteria
尝试此SumProduct+vlookup公式无辅助解决方案,并且可以
在
f9
中为您的Excel 2016工作,公式复制:Try this Sumproduct+Vlookup formula without helper solution, and can work for your Excel 2016
In
F9
, formula copied down :