countif criteria

C

Chris Morley

Please some one help. i need to count cells over 2 colomns only if those
colomns contain yes.

col 1 col 2
yes no
yes yes
yes no

The formula i need, i have used before but lost...! typical. I have tried
using a countif formula and i am sure this was used before with a equal to

=COUNTIF(Sheet1!K:K,Sheet1!I:I="yes") this returns a valye of 0 and i know
that it shoule have counted 6. can any one help

Chris

i have tried =countif(K:K
 
A

aidan.heritage

sounds like another one for SUMPRODUCT - except it will need a defined
range -

=sumproduct(--(k1:K100="Yes"),--(l1:l100="Yes"))
 
A

aidan.heritage

As well as sumproduct, you could simply use

=countif(K:L="Yes")

(I've ignored the sheet1 as it's less typing for me that way!)
 
G

Gary''s Student

Countif does not work over disjoint ranges. You can use either:

=COUNTIF(Sheet1!I:K,"yes")
or
=COUNTIF(Sheet1!I:I,"yes")+COUNTIF(Sheet1!K:K,"yes")
 
A

aidan.heritage

Agreed, I read it as columns K and L which aren't disjointed, and
therefore works
 
V

vener

Chris said:
Please some one help. i need to count cells over 2 colomns only if
those
colomns contain yes.

col 1 col 2
yes no
yes yes
yes no

The formula i need, i have used before but lost...! typical. I have
tried
using a countif formula and i am sure this was used before with a equal
to

=COUNTIF(Sheet1!K:K,Sheet1!I:I="yes") this returns a valye of 0 and i
know
that it shoule have counted 6. can any one help

Chris

i have tried =countif(K:K


try this
=countif(K:I,"yes")
 
G

Gary''s Student

This is a deficency of the font:

IlIlIlIlIl

appears to be a string of identical characters in Arial, but not Verdana.
 

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