Counting multiple criteria

G

GillW

Can someone help a simple soul please? I need to count the number of
instances that particular values appear in a column. I have three
values and I can use COUNTIF for any one of the values, but I can't
work out how to ask for the total occurence of three different values.
I've tried

=COUNTIF(($C4:$C85,"4.3")+($C4:$C85,"4.4")+($C4:$C85,"7.1"))

but I get the usual error message, and that is no help at all!

Much appreciated in advance,
thanks
 
G

Guest

Hi

Try this:
=COUNTIF($C4:$C85,"4.3")+COUNTIF($C4:$C85,"4.4")+COUNTIF($C4:$C85,"7.1")

Andy.
 
R

Ron Rosenfeld

Can someone help a simple soul please? I need to count the number of
instances that particular values appear in a column. I have three
values and I can use COUNTIF for any one of the values, but I can't
work out how to ask for the total occurence of three different values.
I've tried

=COUNTIF(($C4:$C85,"4.3")+($C4:$C85,"4.4")+($C4:$C85,"7.1"))

but I get the usual error message, and that is no help at all!

Much appreciated in advance,
thanks

You're very close.

=COUNTIF(($C4:$C85,"4.3")+countif($C4:$C85,"4.4")+countif($C4:$C85,"7.1"))

In addition, if your values are numbers, and not text, you should get rid of
the quote marks and write:

=COUNTIF(($C4:$C85,4.3)+countif($C4:$C85,4.4)+countif($C4:$C85,7.1))


--ron
 
G

GillW

Thanks for the help. I tried Ron's formula but still got the error,
however, putting the opening bracket before the ist "countif" solved
it! So the result is:

=(COUNTIF($C4:$C85,4.3)+COUNTIF($C4:$C85,4.4)+COUNTIF($C4:$C85,7.1))

Hooray !!

Thanks so much everyone
Gill
 
R

Ron Rosenfeld

Thanks for the help. I tried Ron's formula but still got the error,
however, putting the opening bracket before the ist "countif" solved
it! So the result is:

=(COUNTIF($C4:$C85,4.3)+COUNTIF($C4:$C85,4.4)+COUNTIF($C4:$C85,7.1))

Hooray !!

Thanks so much everyone
Gill

I'm glad you got it working.

With regard to the bracket placement, I had overlooked the two opening brackets
in your original formula when I copied it.

However, you can remove both the opening and closing brackets from your
formula:

=COUNTIF($C4:$C85,4.3)+COUNTIF($C4:$C85,4.4)+COUNTIF($C4:$C85,7.1)


--ron
 
Top