View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Can I combine CountIf with IF or AND?

Are you wanting a count or a sum?

Here's the sum:

=SUMPRODUCT((M8:M264="Issued")+(M8:M264="Delivered "),--(O8:O2640),N8:N264)

Here's the count:

=SUMPRODUCT((M8:M264="Issued")+(M8:M264="Delivered "),--(O8:O2640))

--
Biff
Microsoft Excel MVP


"Gmolatore" wrote in message
...
Can I make the CountIf function conditional by preceding it with IF as
follows:
=IF(O8:O264
0,(CountIF(M8:M264,"Issued",N8:N264)+CountIf(M8: M264,"Delivered",N8:N264))

This formula doesn't work, but you can see what I'm trying to do.
Alternatively to do the same thing using AND:
CountIF(AND((M8:M264,"Issued",O8:O264
0),N8:N264)+CountIf(AND((M8:M264,"Delivered",O8: O264 0),N8:N264))

This also doesn't work. Any tips?