return FALSE; $r = well_tag_thread__update(array('id' => $id), $update); return $r; } function well_tag_thread_find($tagid, $page, $pagesize) { $arr = well_tag_thread__find(array('tagid' => $tagid), array('id' => -1), $page, $pagesize); return $arr; } function well_tag_thread_find_by_tid($tid, $page, $pagesize) { $arr = well_tag_thread__find(array('tid' => $tid), array(), $page, $pagesize); return $arr; } ?>vlookup - How can I count the datas using Countifs and Lookup in google sheet from a different sheet - Stack Overflow
最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

vlookup - How can I count the datas using Countifs and Lookup in google sheet from a different sheet - Stack Overflow

programmeradmin4浏览0评论

I'm having issues with getting the result using my code from different sheet.

Here is my project:

Date Agent Status
02/01/2025 Rey Valid
01/01/2025 Rey Invalid
03/02/2025 Paul Valid
04/03/2025 Rey Valid
01/04/2025 Paul Valid

I'm having issues with getting the result using my code from different sheet.

Here is my project:

Date Agent Status
02/01/2025 Rey Valid
01/01/2025 Rey Invalid
03/02/2025 Paul Valid
04/03/2025 Rey Valid
01/04/2025 Paul Valid

Sheet 2:

Name : Rey
Number of Total Calls 3
Number of Invalid Calls 2
Number of Valid Calls 1

Here is my code:

=COUNTIFS(VLOOKUP(D4(FILTER(Sheet1!A:A, Sheet1!B:B="Rey", Sheet1!C:C="Invalid"),">=01/01/2025", FILTER((Sheet1!A:A, Sheet1!B:B="Rey", Sheet1!C:C="Invalid"),"<=01/31/2025"), TRUE)))
Share Improve this question edited Mar 18 at 20:04 Reynaldo Gravador asked Mar 18 at 19:07 Reynaldo GravadorReynaldo Gravador 214 bronze badges 3
  • I think you've interchanged the outputs for the Number of Invalid Calls and the Number of Valid Calls. From what I see, there's only 1 invalid call with 2 valid calls. – Saddles Commented Mar 18 at 20:10
  • Result that I have is error – Reynaldo Gravador Commented Mar 18 at 20:31
  • Result that I have is error — this seems to be directed to @Gyul. Their answer is working, so it's likely that you just need to fix where the formula is pointed to. – Saddles Commented Mar 18 at 20:44
Add a comment  | 

1 Answer 1

Reset to default 1

Use the COUNTIF/S with the LET and VSTACK functions

I used the COUNTIF/S function to return the count based on a criteria. I also used the LET function to combine the formulas into one and then stack it vertically using VSTACK.

Below is the formula:

=LET(a, COUNTIF(Sheet1!B1:B, "Rey"),
     b, COUNTIFS(Sheet1!B1:B, "Rey", Sheet1!C1:C, "Invalid"),
     c, COUNTIFS(Sheet1!B1:B, "Rey", Sheet1!C1:C, "Valid"),
     VSTACK(a, b, c))

Output:

Name : Rey
Number of Total Calls 3
Number of Invalid Calls 1
Number of Valid Calls 2

References

  • COUNTIFS
  • VSTACK
  • LET

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论