View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom Peo Sjoblom is offline
external usenet poster
 
Posts: 3,268
Default Multiple DSUM criteria (MONTH & a numeric value) between worksheet

First of all don't use the whole sheet as your table, use the real table

secondly when you need to use a formula in the criteria put no header in the
criteria

here's a simplification, assume you table including headers
is A4:C10

assume the criteria is E1:E2 with E1 blank and E2 has this formula

=AND(MONTH(A5)=4,B5=6)

where A5 is the first cell in the date column with a date (header in A4)
and B5 the first with a size, so that formula should return FALSE using your
example

the formula would be

=DSUM(A4:C10,"Amount",E1:E2)

returns 550

Of course the D functions are pretty old fashioned and you could easily use
SUMIFS or
SUMPRODUCT

=SUMPRODUCT(--(MONTH(A5:A10)=4),--(B5:B10=6),C5:C10)



--


Regards,


Peo Sjoblom







"sarah" wrote in message
...
Hello. I'm trying to use DSUM to calculate a row of quantities that fit
the
criteria of a specific month and size. Here's an image explaining what I
am
trying to achieve:

http://i37.tinypic.com/ergxsx.jpg

I have a DSUM formula included in the picture, which is not working.
Any help would be greatly appreciated.

Thank you,

sarah