In another sheet I want to count how many meetings were scheduled for a rep within a date range.

My 3 columns are the date, rep, and misc data


I'm a bit off it seems and I keep going around in circles.

Here is an example. I only want to count if Dates are between 11/9 and 11/15 and if the Rep is Rep1

A         |B
Date      | Rep
11/8      | Rep1
11/9      | Rep2
11/14     | Rep2
11/15     | Rep1
  • How do I combine these "=COUNTIFS($A$2:$A$16, ">=11/09/2019", $A$2:$A$16,"<=11/15/2019",)" "=COUNTIFS(B2:B1000, "Rep!") " – Matthew D Nov 13 '19 at 16:01
  • 2
    Possible duplicate of COUNTIF but when multiple conditions are met + try to use =Importrange() because you can't import data from another spreadsheet like this. You can also share some sample data. – pjmg Nov 13 '19 at 16:59
  • I've tried this and am now getting an error that the arguments must be in pairs =COUNTIFS("1q87c_0rFdt8FcWtIzD0KVW3k1ZpuvhfeWbJou1MEs","Demos!A2:A1000","=>11/09/2019","1q87c_0rFdt8FcWtIzD0KVW3k1ZpuvhfeWbJou1MEs","Demos!A2:A1000","=<11/15/2019","1q87c_0rFdt8FcWtIzD0KVW3k1ZpuvhfeWbJou1MEs","Demos!B2:B1000","Rep1") – Matthew D Nov 14 '19 at 11:54

If you want it all in one cell you need to use Query:

=query(importrange("https://docs.google.com/spreadsheets/d/1q87c_0rFdt8FcWtIzD0KVW3k1ZpuvhfeWb1281MEs","DEMOS!A2:C1000"),"select count(Col1) where Col2 = 'Rep1' and Col1 >= Date '2019-11-9' and Col1 <= Date '2019-11-15' label count(Col1) ''")
| improve this answer | |
  • Thank you for the help! That does import the data, however I was looking for a count of all of the instances that meet that criteria, any suggestions? – Matthew D Nov 14 '19 at 11:44
  • @MatthewD updated answer, instead of selecting * you just select count(Col1) I also added a blank label to the end to remove the header so now the formula is just returning a count. Please let me know if it is working for you. – CodeCamper Nov 14 '19 at 11:49
  • Amazing! It worked perfectly. I would have never gotten there, thank you so much for you help!! @CodeCamper – Matthew D Nov 14 '19 at 11:57
  • I did, but I'm new so it doesn't show publicly – Matthew D Nov 14 '19 at 11:59

Not the answer you're looking for? Browse other questions tagged or ask your own question.