I am attempting to set up a formula in excel that will look at a range of data which has dates specified in c7:c30, and categories Active-"A" and Completed-"C" in L7:L30. I am attempting to have excel look at each row individually and compare whether the dates are between quarter dates specified of 1/1/12 (B38) and 3/31/12 (C38) (the first quarter of the year), and if this condition is met then count those that are marked with "A" for active.

I have come up with the following that does not work as it is only looking at the first date specified and counting all marked with "A" if the first date matched the first quarter specifications.

{=(IF(($C$7:$C30>=$B$39)*($C$7:C$30<=$C$39),COUNTIF($L$7:$L30,"a"),0))}

Please help me figure out what is wrong with this formula that it will not look at each row individually and, is instead counting all indicated with A if the first date is found true against the if statement presented.

Sorry, not great at excel, any help is appreciated.

Thanks!