SumProduct/SUMIF?

K

kkondrat1

ok here is my data:

columnA
ACCOUNT EXE
Jason
Scott
Peter
Jason
Peter
Jason

columnB
DAT
1/01/04
blank
2/15/04
3/15/04
9/04/04
1/13/04

columnC
AMOUN
30,000
29,000
28,000
blank
41,000
22,000

I want to set up a summary to sum the amounts by month per accoun
exec:

like this:
---------------Jason-----Scott---Peter
January 04---52,000----0.00---0.00
February 04--0.00-------0.00---28,000


I was using sumproduct, here is the formula:

=SUMPRODUCT($M$2:$M$5121>=A1)*($M$2:$M$5121<=DATE(YEAR($A2),MONTH($A2)+1,0)*($H$2:$H$5112=$B$1))

I am having trouble summing the amounts
 
F

Frank Kabel

Hi
if this formula is counting correctly just add the sum range:
=SUMPRODUCT($M$2:$M$5121>=A1)*($M$2:$M$5121<=DATE(YEAR($A2),MONTH($A2)+
1,0)*($H$2:$H$5112=$B$1)*(C2:C5121))
 
D

Domenic

Assuming that your data is contained on Sheet1, and your summary o
Sheet2, put the following formula in B2 of Sheet2, and copy across an
down:

=SUMPRODUCT(--(Sheet1!$A$2:$A$7=Sheet2!B$1),--(MONTH(Sheet1!$B$2:$B$7)=MONTH(Sheet2!$A2)),--(YEAR(Sheet1!$B$2:$B$7)=YEAR(Sheet2!$A2)),Sheet1!$C$2:$C$7)

Hope this helps
 
M

Max

=SUMPRODUCT($M$2:$M$5121>=A1)*($M$2:$M$5121<=DATE(YEAR($A2),MONTH($A2)+1,0)*
($H$2:$H$5112=$B$1))

Just a tiny observation ..
but should $H$2:$H$5112 be $H$2:$H$5121 ?
(probably a typo in the range ref)

You could try out Domenic's solution (it works)
and adapt it to suit your set-up
 

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