Countifs by consider dates range

google-spreadsheets

I have a formula which is like this

=COUNTIFS('sheet1 '!W:W,">0",'sheet1 '!A:A,"Truck")

which is count all data in column W (sheet1) larger than 0, which are called Truck in column A.

Now, I want this formula to read the same information but by consider a range of dates in between 1st of October to 15th (I have dates in Column B).
Any input is greatly appreciate.
Thanks

Best Answer

If you’re talking about Excel, the formula is

=COUNTIFS(W:W,">0", A:A,"Truck", B:B,">10/1/2017", B:B,"<10/15/2017")

You may want to change the > and < to >= and <=, depending on whether you want to include Oct 1 and Oct 15 in your “between” range.  Illustration:

  Excel spreadsheet illustrating the above formula

Only row 7 is counted.

If you’re talking about Google spreadsheets, the above might also work, but I don’t know.


And, of course, if you normally write dates as dd/mm/yyyy, then you should use 1/10/2017 and 15/10/2017.

Related Question