MrExcel Publishing
Your One Stop for Excel Tips & Solutions

=COUNTIF using two criteria

Posted by Samuel John SDhoptaw on August 31, 2001 7:43 AM

I would like to set up a criteria based on date and name of project. Date is in cell “M” and project name is in cell “AH” using =COUNTIF. Can someone help me?

Posted by Mark W. on August 31, 2001 7:54 AM

Use the array formula...


Note: Array formulas are entered using the
Control+Shift+Enter key combination. The braces,
{}, are not entered by you -- they're supplied
by Excel in recognition of properly entered
array formula.

Posted by Aladin Akyurek on August 31, 2001 7:55 AM

=SUMPRODUCT((M2:M100=the-cel-that contains-criterion-date)*(AH2:AH100=the-cell-that-contains-criterion-project-name))

where I assumed that all your dates are in M2:M100 and project names in AH2:AH100.