Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default countif for two ranges?

Example:

I'd like to use COUNTIF to alnalyze the following two ranges and come
up with a formula that would spit out how many times joe is green. And
then modify it for joe meeting a blue condition, mary meeting green,
blue, etc. Is this possible? From what I've been reading COUNTIF can't
compare two ranges? Is a macro the only way to go here?

Any help would be appreciated.


column A Column B
joe green
mary green
joe blue
joe blue
joe green
mary blue
joe green
mary green
mary green

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,393
Default countif for two ranges?

=SUMPRODUCT(--(A1:A100="Joe"),--(B1:B100="green")
see
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

http://mcgimpsey.com/excel/formulae/doubleneg.html
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

wrote in message
oups.com...
Example:

I'd like to use COUNTIF to alnalyze the following two ranges and come
up with a formula that would spit out how many times joe is green. And
then modify it for joe meeting a blue condition, mary meeting green,
blue, etc. Is this possible? From what I've been reading COUNTIF can't
compare two ranges? Is a macro the only way to go here?

Any help would be appreciated.


column A Column B
joe green
mary green
joe blue
joe blue
joe green
mary blue
joe green
mary green
mary green



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default countif for two ranges?

absolutely perfect - you are a 1337 h4x0r
gracias

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,393
Default countif for two ranges?

Thanks - I hope being a "1337 h4x0r" is a good thing!
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

wrote in message
oups.com...
absolutely perfect - you are a 1337 h4x0r
gracias



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 & Ranges Question Tyges79 Excel Discussion (Misc queries) 6 September 23rd 08 01:27 AM
COUNTIF within date ranges Jock Charts and Charting in Excel 2 August 7th 07 09:06 AM
countif with non-continous ranges Debbie Excel Worksheet Functions 7 May 10th 06 09:00 PM
Countif between ranges BSantos Excel Discussion (Misc queries) 1 February 15th 06 05:52 PM
COUNTIF on one ranges with criteria from another SaraK Excel Programming 3 May 24th 04 10:22 PM


All times are GMT +1. The time now is 09:03 AM.

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

About Us

"It's about Microsoft Excel"