![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Location: Scott Taylor
Posts: 1
|
I saw this question earlier with a sum problem but I need a solution that will work using the countif function.
I need to "countif" two seperate criteria are met... if rangeA=value1 and rangeB=value2. Thanks for any help. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
This is a common request.
Try something like =SUMPRODUCT((Range1=Criteria1)*(Range2=Criteria2)) Where Range1 is something like A1:A10, Criteria1 is something like D1 or "Condition". Same applies to Range2 and Criteria2 |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Juan's non-array formula may be better;
Here is an array formula: {=SUM(IF(A1:A10="criterion1",IF(B1:B10="criterion2",1,0)))} Regards! Edit: I just wanted to add that even though the formula uses the SUM function, the formula is actually counting the number of items that meet both the criteria. [ This Message was edited by: Yogi Anand on 2002-05-22 18:15 ] [ This Message was edited by: Yogi Anand on 2002-05-22 20:15 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|