I have spent a couple of hours trying to find a way to achieve this, but I'm stuck. Please help!

What is the formula to count number of cells greater or less than 0 (zero) between two dates in Excel? For example: In the following extract there are 4 occurrences greater than 0 and 2 less than 0 between 4/26 and 4/28

enter image description here

Thank you for your time!

3

2 Answers

For dates in column A and values in column B, try:

=SUMPRODUCT((A:A>=DATE(2020,5,11))*(A:A<=DATE(2020,5,21)*(B:B<>0))) 

for a date range from May 11th through May 25th:

enter image description here

NOTE:

  1. assumes real dates and not text values
  2. will work for both UK & US date formats
4

You would use a COUNTIFS() Presuming your list of dates is in column A and your list of numbers is in column B and the date range is greater than 13/03/2020 but less than the 20/03/2020 then the formula would be:

=COUNTIFS(A:A,">13/03/2020",A:A,"<20/03/2020",B:B,"<>0") 
4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy