Thread: COUNTIF
View Single Post
  #4   Report Post  
Duke Carey
 
Posts: n/a
Default

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)="Jo hn"))

"Laur" wrote:

Thanks but it didn't work. Any other suggestions?

"Andy B" wrote:

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.

"Laur" wrote in message
...
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.