Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > PC based Database Applications > Microsoft Excel > Excel, countif, multiple columns

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-02-08, 07:17
Karen Day Karen Day is offline
Registered User
 
Join Date: May 2002
Posts: 55
Excel, countif, multiple columns

Hi there,

I have say 3 columns of data in an excel spread sheet.

Column A = Multiple Names
Column B = MO, VOL, FWD
Column C = Mr, Mrs, Ms, Miss

So
Column A Column B Column C
John Doe MO Mr
Mary Smith Vol Ms
Lucy Richardo Mo Mrs
William Shatner FWD Mr
John Smith MO Mr
etc

I want to count column C only counting MR if Column B has MO in it.

So in the above example I would end up with a count of 2.

Can anyone help me with this?

thanks heaps in advance for any assistance.

Regards
Karen
Reply With Quote
  #2 (permalink)  
Old 07-02-08, 10:45
shades shades is offline
Registered User
 
Join Date: Oct 2003
Posts: 1,080
Multi-condition count is accomplished with SUMPRODUCT

=SUMPRODUCT(($B$2:$B$100="MO")*($C$2:$C$100="MR"))

Notice that you cannot refer to the entire column, and all conditions must refer to the same length range.
__________________
old, slow, and confused
but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3/28/2008)

How to ask a question on forums
Reply With Quote
  #3 (permalink)  
Old 07-02-08, 11:40
Karen Day Karen Day is offline
Registered User
 
Join Date: May 2002
Posts: 55
Thank you so much - works perfectly
regards
Karen
Reply With Quote
  #4 (permalink)  
Old 10-28-08, 09:54
Tbug2 Tbug2 is offline
Registered User
 
Join Date: Oct 2008
Location: Northwest Indiana
Posts: 1
Thanks from me, too. I couldn't figure out how to make countif work for this situation, either. Sometimes slow and old is better, take's one to know one!
Reply With Quote
  #5 (permalink)  
Old 10-28-08, 15:35
shades shades is offline
Registered User
 
Join Date: Oct 2003
Posts: 1,080
Glad that it helped.
__________________
old, slow, and confused
but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3/28/2008)

How to ask a question on forums
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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