COUNT function... I think!

G

Guest

I have two colomns of data, I need to operate the count function only if the
data in both colomns, within the same row are true i.e

I need to count the how many times the trade "car" happens to be a priority
"2".

Trade Priority
CAR 2
BRI 2
ROO 2a
ELE 2a
PLU 3
CAR 2

I have tried to use =COUNTIF, =COUNT(IF

Is this possible and what is the correct formula/function to use?
 
T

T. Valko

Try this:

=SUMPRODUCT(--(A1:A10="car"),--(B1:B10=2))

Better to use cells to hold the criteria:

D1 = car
E1 = 2

=SUMPRODUCT(--(A1:A10=D1),--(B1:B10=E1))
 
D

David Biddulph

=SUMPRODUCT(--(A2:A7="Car"),--(B2:B7=2))
If the priority is text, rather than a number, then you'd need quotes, so
=SUMPRODUCT(--(A2:A7="Car"),--(B2:B7="2"))
 

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