Sam asks in this post: Count records between two dates in excel

Any chance this would work with multiple parameters.
I need to count how many times JA appears in a given period 1-Sep-10 and 10-Sep-10

A B
1 JA 2-Sep-10
2 SH 11-Sep-10
3 JA 3-Sep-10

I can't seem to link CountIf(A1:A3,"JA") and the Sum(If) part

any help greatly appreciated.

Answer:

Count records between two dates and a criterion

Formula in E2:

=SUMPRODUCT(--($B$1:$B$9<=$E$2), --($B$1:$B$9>=$E$1), --($A$1:$A$9=$E$3)) + ENTER

Count records between two dates and multiple criteria


Formula in E4:

=SUMPRODUCT(--($B$1:$B$9<=$E$2), --($B$1:$B$9>=$E$1), --(COUNTIF($G$1:$G$2, $A$1:$A$9)))  + ENTER

Adjust bolded range ($G$1:$G$2) to add more criteria.

Download excel sample file for this tutorial

Count records between two dates and multiple criteria.xls
(Excel 97-2003 Workbook *.xls)

Functions in this article:

SUMPRODUCT(array1, array2, )
Returns the sum of the products of the corresponding ranges or arrays

COUNTIF(range,criteria)
Counts the number of cells within a range that meet the given condition