count only if

E

Erin

How do I count the number of cells only if E1:E100 contains "ray" and F1:F100
contains a "d"? I only want the "d's" in column if column E has Raytheon.
Right now it's counting all the "d's" in column f and all the "ray's" in
column e, but I only want column f to count if column e has ray. Hope that
makes sense. Please help.
 
G

Gary Keramidas

not quite sure what you ant, nut give this a try

=SUMPRODUCT((E1:E100="Raytheon")*(F1:F100="d"))
 
E

Erin

I tried (the critera is on worksheet named masterlist)...

=SUMPRODUCT(--(MASTERLIST!E2:E100="*Ray"),--(MASTERLIST!F2:F100="*d"))

but it doesn't work. :-(
 
F

Fred Smith

That's because Sumproduct does not support wildcards. You need to do it this
way:
=SUMPRODUCT(--(ISNUMBER(SEARCH("ray",MASTERLIST!E2:E100))),--(ISNUMBER(SEARCH("d",MASTERLIST!F2:F100))))

Regards,
Fred
 
E

Erin

Shoot.....thank you, but it returned a 0.

I even tried ....

=SUMPRODUCT(--(MASTERLIST!E2:E100="Raytheon"),--(MASTERLIST!F2:F100="d"))

(the criteria is on the Masterlist worksheet) but that didn't work either. I
also tried:

=COUNTIF(MASTERLIST!E2:E100,"*Raytheon")+COUNTIF(MASTERLIST!F2:F100,"*d")

but that counted all the d's in column f and all the raytheon's in column e

any other ideas?
 

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