ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Multiple count if (https://www.excelbanter.com/excel-worksheet-functions/238294-multiple-count-if.html)

OzzyJim

Multiple count if
 
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

Shane Devenshire[_2_]

Multiple count if
 
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,"re pair")

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"))

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"OzzyJim" wrote:

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


OzzyJim

Multiple count if
 
Cheers Shane, appreciate your help.....03 version seemed to work for some
reason.

Countifs returned an name# error

Thanks again

"Shane Devenshire" wrote:

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,"re pair")

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"))

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"OzzyJim" wrote:

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



All times are GMT +1. The time now is 05:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com