Blanks in SUMPRODUCT

S

SSR

Hi folks,
I had posted my initial Problem and got a solution from Frank, now here is
another problem i'm facing can anuyone help .
I have a Sheet where i have 2 columns as below, The First Colum is a Date
and the Second Column is say Cost of an Item

A B
1/2/04 100
2/2/04 101
20/2/04 200
3/8/04 300
5/8/04 500
15/8/04 700
19/9/04
25/9/04 20
30/10/04
...
...

What i want is
A B C
1/2/04 100
2/2/04 101
20/2/04 200 401=100+101+200
3/8/04 300
5/8/04 500
15/8/04 700 1500=300+500+700
19/9/04
25/9/04 20 20=20
30/10/04
...
...

Note here that 2 of the Cells are Blank. How can this be detected if i use
the basic SUMPRODUCT formula as given below
=IF(OR(MONTH(A2)<>MONTH(A1),A2=""),SUMPRODUCT(--(MONTH($A$1:$A$1000)=MONTH(A
1)),--(YEAR($A$1:$A$1000)=YEAR(A1)),$B$1:$B$1000),"")


Thanks
SSR
 
A

Arvi Laanemets

Hi

Try


=IF(OR(MONTH(A2)<>MONTH(A1),A2=""),SUMPRODUCT(--(MONTH($A$1:$A$1000)=MONTH(A
1)),--(YEAR($A$1:$A$1000)=YEAR(A1)),--($B$1:$B$1000<>""),$B$1:$B$1000),"")


--
Arvi Laanemets
(When sending e-mail, use address arvil<At>tarkon.ee)
 

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