Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default COUNTIF() with multiple criteria

I am looking to pull some data about a section of one of my worksheets.

Specificly I have 3 columns that I want a count of the number of
instances of each unique combination in those 3 cells (IE the number of
times "1, 0, 0" appears, "1, 1, 0" appears, "1, 1, 1" appears, etc
etc).

The second part of this would be If it was possible to semi automate
this so that I don't have to write a function for each unique series.

Thank you very much for any and all help you can offer me.

AlexV

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default COUNTIF() with multiple criteria


If you put your combinations in say 3 columns,starting at say Row 2

e.g. D2,E2,F2 = 1,0,0 respectively, D3,E3,F3 = 1,1,0 respectively,
etc...


Then you can use:

=sumproduct(--($A$2:$A$100=D2),--($B$2:$B$100=E2),--($C$2:$C$100=F2))
and copy down. Where A2:C100 contain the combinations.

Adjust ranges and references to suit you.


--
Vito
------------------------------------------------------------------------
Vito's Profile: http://www.excelforum.com/member.php...o&userid=29182
View this thread: http://www.excelforum.com/showthread...hreadid=558876

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default COUNTIF() with multiple criteria

Thank you that is working well for me.

However, if you would not mind I do not realy get exactly what it is
doing. I looked up SUMPRODUCT and I see what it does. However I do
not know what the "--" operator does (nor do I realy understand how
Excel handels multiplying the parts of a one column array).

Thank you again!

AlexV

Vito wrote:
If you put your combinations in say 3 columns,starting at say Row 2

e.g. D2,E2,F2 = 1,0,0 respectively, D3,E3,F3 = 1,1,0 respectively,
etc...


Then you can use:

=sumproduct(--($A$2:$A$100=D2),--($B$2:$B$100=E2),--($C$2:$C$100=F2))
and copy down. Where A2:C100 contain the combinations.

Adjust ranges and references to suit you.


--
Vito
------------------------------------------------------------------------
Vito's Profile: http://www.excelforum.com/member.php...o&userid=29182
View this thread: http://www.excelforum.com/showthread...hreadid=558876


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 79
Default COUNTIF() with multiple criteria

Unfortunately Excel help only explains the basics of SUMPRODUCT. However,
there's a page with very good explanation of SUMPRODUCT at:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

-Simon

"Thansal" wrote:

Thank you that is working well for me.

However, if you would not mind I do not realy get exactly what it is
doing. I looked up SUMPRODUCT and I see what it does. However I do
not know what the "--" operator does (nor do I realy understand how
Excel handels multiplying the parts of a one column array).

Thank you again!

AlexV

Vito wrote:
If you put your combinations in say 3 columns,starting at say Row 2

e.g. D2,E2,F2 = 1,0,0 respectively, D3,E3,F3 = 1,1,0 respectively,
etc...


Then you can use:

=sumproduct(--($A$2:$A$100=D2),--($B$2:$B$100=E2),--($C$2:$C$100=F2))
and copy down. Where A2:C100 contain the combinations.

Adjust ranges and references to suit you.


--
Vito
------------------------------------------------------------------------
Vito's Profile: http://www.excelforum.com/member.php...o&userid=29182
View this thread: http://www.excelforum.com/showthread...hreadid=558876



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
Use multiple criteria with COUNTIF: between dates and not blank l.shields Excel Worksheet Functions 13 July 27th 09 06:53 PM
Counting cells using multiple criteria andrew.curley Excel Worksheet Functions 4 June 12th 06 04:41 PM
Multiple Criteria using countif calmo Excel Worksheet Functions 6 October 25th 05 08:33 PM
multiple criteria in one field 4a,4b etc of countif? Anne-Marie Excel Discussion (Misc queries) 1 October 20th 05 02:23 PM
Multiple CountIf Criteria JerryS Excel Worksheet Functions 1 October 14th 05 07:14 PM


All times are GMT +1. The time now is 08:40 PM.

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"