Counting multiple criteria

  • Thread starter Thread starter GillW
  • Start date Start date
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
 
Hi

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

Andy.
 
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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top