使用vlookup作为Countifs内部的标准

发布于 2025-01-30 00:49:38 字数 698 浏览 2 评论 0原文

经过多年使用这个社区,我有一个无法找到答案的问题。希望大家能提供帮助!

我试图计算每个人逾期的“接地”项目数量。我的屏幕截图( 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

北音执念 2025-02-06 00:49:38

使用Excel 2016,我会说mmult()在这里是一个很好的选择:

< img src =“ https://i.sstatic.net/fccij.png” alt =“在此处输入图像说明”>

f9中的cse-formula:

=SUM((A$2:A$7=E9)*(MMULT((TRANSPOSE(G$2:G$4)=B$2:B$7)*(TRANSPOSE(H$2:H$4)="Grounding"),ROW(G$2:G$4)^0))*(C$2:C$7<=F$8))

With Excel 2016 I'd say MMULT() is a good alternative here:

enter image description here

CSE-Formula in F9:

=SUM((A$2:A$7=E9)*(MMULT((TRANSPOSE(G$2:G$4)=B$2:B$7)*(TRANSPOSE(H$2:H$4)="Grounding"),ROW(G$2:G$4)^0))*(C$2:C$7<=F$8))
_蜘蛛 2025-02-06 00:49:38

您可以添加第四列存储该任务是否扎根于

D2的公式将是:

=INDEX($H$2:$H$4,MATCH(B2,$G$2:$G$4,0))

修改您的Countifs公式以将此新列用作标准

=COUNTIFS($A$2:$A$7,$E9,$C$2:$C$7,"<="&$F$8,$D$2:$D$7, "Grounded")

You could add a fourth column that stores whether that Task is Grounded

The formula for D2 would then be:

=INDEX($H$2:$H$4,MATCH(B2,$G$2:$G$4,0))

Modify your CountIfs formula to use this new column as a criteria

=COUNTIFS($A$2:$A$7,$E9,$C$2:$C$7,"<="&$F$8,$D$2:$D$7, "Grounded")
逆流 2025-02-06 00:49:38

尝试此SumProduct+vlookup公式无辅助解决方案,并且可以

f9中为您的Excel 2016工作,公式复制:

=SUMPRODUCT((A$2:A$7=E9)*(VLOOKUP(T(IF({1},$B$2:$B$7)),G$2:H$4,2,0)="Grounded")*($C$2:$C$7<=$F$8))

“在此处输入图像说明”

Try this Sumproduct+Vlookup formula without helper solution, and can work for your Excel 2016

In F9, formula copied down :

=SUMPRODUCT((A$2:A$7=E9)*(VLOOKUP(T(IF({1},$B$2:$B$7)),G$2:H$4,2,0)="Grounded")*($C$2:$C$7<=$F$8))

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文