Countcells if they match certain criteria from other cells

F

FormulaQuestioner

I have been playing around with the countif statements and am trying to
figure out a forumla which I can not see to code:

Criteria

Count the cells from d6:d7 if cell has the word "PS 2" and (e6:e7 or f6:f7
does not say "Not on Network") *I think that this could just be the same
formula for the one where it checks for blank, but if I am wrong I added this*

Any help would be appreciated

For the real table the ranges are much larger, I just put them as small
numbers for less typing.
 
P

Pete_UK

Use COUNTIF when you only have one criteria. Where you have more, then
use SUMPRODUCT, like this:

=SUMPRODUCT((D6:D10="PS 2")*(E6:E10<>"Not on Network"))

I've made the ranges a bit bigger - they should be equal in size, but
cannot be a full column (unless you have XL2007).

Hope this helps.

Pete
 
F

FormulaQuestioner

Thank-you

Pete_UK said:
Use COUNTIF when you only have one criteria. Where you have more, then
use SUMPRODUCT, like this:

=SUMPRODUCT((D6:D10="PS 2")*(E6:E10<>"Not on Network"))

I've made the ranges a bit bigger - they should be equal in size, but
cannot be a full column (unless you have XL2007).

Hope this helps.

Pete
 
F

FormulaQuestioner

How would I change it where D6:D10 could be "Ps 2" or "USB" and E6:E10 could
not be "Not on Network" would I put the code:

I tried the code

=SUMPRODUCT((D6:D10="PS 2")*(D6:D10="USB")*(E6:E10<>"Not on Network"))

And it always results in a zero. I know it is because D can not have PS 2
and USB in the same cell at the same time. How could I change it to be either
PS2 or USB?
 
J

JP

The + sign acts as the logical 'OR' function. So the formula would be

=SUMPRODUCT(((D6:D10="PS 2")+(D6:D10="USB"))*(E6:E10<>"Not on
Network"))

i.e. "PS 2" or "USB" in D6:D10, and "Not on Network" in E6:E10.

HTH,
JP
 

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