excel formula - Counting instances between 2 dates -


i have following date ranges :-

01/01/2017 31/12/2017
01/06/2017 31/05/2018
01/02/2017 31/01/2018
01/01/2017 31/12/2017
01/06/2017 31/05/2018
01/02/2017 31/01/2018

is possible, via formula, count of ranges include specific date?

for example, date of 31/01/2017 give result of 2 (the first , forth rows)

use countifs:

the countifs function applies criteria cells across multiple ranges , counts number of times criteria met.
https://support.office.com/en-gb/article/countifs-function-dda3dc6e-f74e-4aee-88bc-aa8c2a866842

so data in range a1:b6 , criteria date in cell d1:
=countifs($a$1:$a$6,"<=" & $d$1, $b$1:$b$6,">=" & $d$1)

nb: countifs available excel 2007 onwards.

for excel 2003 use:
=sumproduct(($a$1:$a$6<=$d$1)*($b$1:$b$6>=$d$1))


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -