Array formula to count based on conditions

P

Pierre Archambault

Hi everybody,

I am using Excel 2000 on Windows 2000 Pro.

I use a workbook as a banking statement in which I have the following
informations:

A B C D E
Date Descr. Debit Credit Balance

The data begins on the 7th line and ends on line 1079.

I need a formula in an other cell that would give me the number of debits
for a given month.

example:

TheMonth TheYear
8 2004

I already have a formula but it doesn't give the correct result and I can't
see why !

{=COUNT((MONTH(A7:A1079)=TheMonth)*(YEAR(A7:A1079)=TheYear)*C7:C1079)}

Is there someone who could give me a hint ?

Thanks
Pierre
 
H

Harlan Grove

Frank Kabel said:
use something like
=SUMPRODUCT(--(MONTH(A7:A1079)=2),--(YEAR(A7:A1079)=2004),
--(C7:C1079="Debit"))
....

Or something like

=SUMPRODUCT(--(--TEXT(A7:A1079,"yyyymm")=200402),--(C7:C1079="Debit"))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top