Multiple count if

  • Thread starter Thread starter OzzyJim
  • Start date Start date
O

OzzyJim

Hi All,

Using this to count number of occurrences between given dates

=COUNTIF($AF$17:$AF$2008,">="&"1/2/2009")-COUNTIF($AF$17:$AF$2008,">"&"28/2/2009")

Now want to add an if function i.e if $B$17:$B$2200="repair" then count
using the above
Any ideas?
Cheers
Jim
 
Hi,

In 2007 you can use

=COUNTIFS($AF$17:$AF$2008,">="&DATE(2009,2,1),$AF$17:$AF$2008,"<="&DATE(2009,28,2),$B$17:$B$2008,"repair")

but be careful you have two different length ranges in you example, one
running to row 2008 and one to 2200. That won't work.

In 2003:

=SUMPRODUCT(--($AF$17:$AF$2008>=--"1/2/2009"),--($AF$17:$AF$2008<=--"28/2/2009"),--($B$17:$B$2008="repair"))
 
Cheers Shane, appreciate your help.....03 version seemed to work for some
reason.

Countifs returned an name# error

Thanks again
 
Back
Top