COUNTIF

G

Guest

I need to count how many times "D" comes up in column A but only when ordered
by John in Column C.

TYPE CUSTOMER ORDERED BY
D TRICIN JONATHAN
D ATLANTIC PKG. DAN
D ATLANTIC PKG. JOHN
E SONCIN PAUL

I hope this makes sense and thanks for the help.
 
A

Andy B

Hi

Try:
=SUMPRODUCT((A2:A100="D")*(C2:C100="John"))
Note that the ranges in SUMPRODUCT must be the same size - and cannot be
full columns

Andy.
 
G

Guest

It works, so long as the entries for "D" types have no extra spaces, and same
for the names - no extra spaces

Try this, in case there are spaces:

=SUMPRODUCT((TRIM(A2:A100)="D")*(TRIM(C2:C100)="John"))
 

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