View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.worksheet.functions
tywlam tywlam is offline
external usenet poster
 
Posts: 22
Default Sum of named ranges conditional to date?

The SUMIF function can work with one criteria given. How can I modify a
formula by adding other functions to make the SUMIF work with TWO criterion
met?

Thanks



"SleazyBreezy" wrote:

Thank you very much! Thankfully, my date criteria is static, so the X2/Y2
variables are not needed. I used your formula to achieve the desired result
by moving the closing quotes as follows:

=SUMIF(Base_Date,"=03/01/2005",Base_Amount)-SUMIF(Base_Date,"03/31/2005",Base_Amount)


"Aladin Akyurek" wrote:

=SUMIF(Base_Date,"="&X2,Base_Amount)-SUMIF(Base_Date,""&Y2,Base_Amount)

where X2 houses the first day date of the month/year of interset like:
03/01/2005 and Y2 one of:

03/31/2005

=DATE(YEAR(X2),MONTH(X2)+1,0)