CountIF Function

U

ub

How Can I have multiple condition using countif function.
Ex: If I want to count only those cells that have value >300 and <700
 
R

RichardSchollar

Hi

You can use Sumproduct:

=SUMPRODUCT((A1:A100>300)+0,(A1:A100<700)+0)

Note that you can't use whole column refs with sumproduct though (ie
so no A:A - the max is A1:A65536).

Alternatively, you could use COUNTIF:

=SUM(COUNTIF(A:A,{">300",">=700"})*{1,-1})

Hope this helps!

Richard
 
U

ub

Hi,
It worked, Thanks
How can we use the same countif function or any other function if we are
wrking with dates or strings.
Ex: to count cells between 2 set of dates or to count cells that match
string('sale' or 'quote')
 
Top