简体   繁体   English

使用 Countif、Vlookup 和 Importrange

[英]Using Countif, Vlookup and Importrange

I'm currently struggling with using the Countif, Vlookup and Importrage formula on Google Sheets...我目前正在努力在 Google 表格上使用 Countif、Vlookup 和 Importrage 公式...

I need to pull data from the raw data sheet to the data set that I'm using and can't get it right.我需要将原始数据表中的数据提取到我正在使用的数据集中,但无法正确处理。

Formula that I have is as follows:我的公式如下:

=countif(vlookup(A2,IMPORTRANGE("URL","Data:A2,I940"),9,false),"supplier") =countif(vlookup(A2,IMPORTRANGE("URL","Data:A2,I940"),9,false),"供应商")

I need to look up the date and then get the count for how many "Suppliers" we had on that specific dates..我需要查看日期,然后计算我们在特定日期有多少“供应商”..

Anyone having the same issue or is my brain just over worked???任何人都有同样的问题,或者我的大脑刚刚过度工作???

I think a better choice would be to use a query formula instead.我认为更好的选择是使用查询公式。
Please follow the logic of this given formula请遵循这个给定公式的逻辑

=QUERY({B1:D12},"select count(Col1) 
                 where Col3=date'"&TEXT(F1,"yyyy-mm-dd")&"' and Col2='"&F2&"'
                 label count(Col1) '' ")

在此处输入图像描述

(Do adjust ranges to your needs) (根据您的需要调整范围)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM