COUNTIF function help

E

Elemental

I have used the COUNTIF function before and it works great when doing an in
order cell count (ex. A1:A20). But now I am needing the COUNTIF function
to count certain cell blocks (ex. A1:A3 then A5:A8, etc). How would I go
about doing the formula for this?

My current forumal looks like this and it tells me too many arguments are
entered for this function:

=COUNTIF(D13:D15,D21:D23,"=0")

Any help? TIA!
 
K

KL

Hi Elemental,

You can't use COUNTIF with multiple ranges (it only allows two arguments),
so you'll need to do it like this:

=COUNTIF(D13:D15,"=0")+COUNTIF(D21:D23,"=0")

or a much less efficient:

=SUMPRODUCT(COUNTIF(INDIRECT({"D13:D15","D21:D23"}),"=0"))

Regards,
KL
 
E

Elemental

Thanks for the help! I used you much less efficient method because it was
easier for me to compile all the ranges needed, which were quite a lot! So
again, thanks!
 

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

Top