#1   Report Post  
Laur
 
Posts: n/a
Default COUNTIF

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.




  #2   Report Post  
Andy B
 
Posts: n/a
Default

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.






  #3   Report Post  
Laur
 
Posts: n/a
Default

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.







  #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.







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
COUNTIF COMBINATION?? Heather Excel Worksheet Functions 1 April 26th 05 02:44 AM
Combining IF and COUNTIF based on two columns maxtrixx Excel Discussion (Misc queries) 5 March 31st 05 06:21 PM
COUNTIF in one colum then COUNTIF in another...??? JonnieP Excel Worksheet Functions 3 February 22nd 05 02:55 PM
Countif - Countif maswinney Excel Worksheet Functions 3 November 15th 04 11:06 PM
countif, again Liz G Excel Worksheet Functions 2 November 1st 04 11:20 PM


All times are GMT +1. The time now is 05:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"