Thread: SUMPRODUCT
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default SUMPRODUCT

=sumproduct() likes numbers:

=SUMPRODUCT(--(Month(A1:A365)=1),B1:B365)

But be careful. An empty cell will look like it has a month() of january.

=SUMPRODUCT(--(Month(A1:A365)=1),--(a1:a365<""),B1:B365)
might be better.

Ellen G wrote:

I have a spreadsheet that looks something like:

Row A 1/1/07 1/2/07 1/3/07 .... 12/31/07
Row B 4 2 5 .... 9

I would like to sum everthing in row B within a certain month. I have tried:

=SUMPRODUCT(Month(A1:A365)=1,B1:B365)

This is not working. Would someone tell me what I'm missing?

Thanks so much.
Ellen


--

Dave Peterson