Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Calculate a SUMIF if criteria is between 2 date ranges

I want to create a SUMIF function but I only want it to return the value of
items within and inclusive of 2 dates. e.g the sum of column C if column A
has dates between 01/07/06 and 30/09/06 inclusive.

Similarly I want to create a COUNTA function for the same criteria.

I am using Microsoft Excel 2003.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 510
Default Calculate a SUMIF if criteria is between 2 date ranges

Hi Anthony,

=SUMPRODUCT(($A$2:$A$20"01/07/06")*($A$2:$A$20<="30/09/06"),$C$2:$C$20)

should do the job ... adjust the ranges to your needs


Carim

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Calculate a SUMIF if criteria is between 2 date ranges

Many thanks for that Carim, unfortunately it still won't work as it keeps
telling me there is an error in the formula. Oh well back to the drawing
board.
Regards
Tony


"Carim" wrote:

Hi Anthony,

=SUMPRODUCT(($A$2:$A$20"01/07/06")*($A$2:$A$20<="30/09/06"),$C$2:$C$20)

should do the job ... adjust the ranges to your needs


Carim


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 510
Default Calculate a SUMIF if criteria is between 2 date ranges

Anthony,

Formula would work if you would extract the dates in separate cells and
use their addresses in the formula :

=SUMPRODUCT(($A$2:$A$20D2)*($A$2:$A$20<=E2),$C$2: $C$20)

if cell D2 = 01/07/06 and cell E2 = 30/09/06

HTH
Carim

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Calculate a SUMIF if criteria is between 2 date ranges

You would normally do a sumif if less than 30/09/06 and subtract from
this a sumif if less than or equal to 01/07/06, so it would look
something like:

=SUMIF(A1:A1000,"<30/09/06",C1:C1000) -
SUMIF(A1:A1000,"<=01/07/06",C1:C1000)

Adjust the ranges to suit.

Hope this helps.

Pete

Anthony P wrote:
I want to create a SUMIF function but I only want it to return the value of
items within and inclusive of 2 dates. e.g the sum of column C if column A
has dates between 01/07/06 and 30/09/06 inclusive.

Similarly I want to create a COUNTA function for the same criteria.

I am using Microsoft Excel 2003.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for a formula to calculate date intervals Sandy - PEAK ASSIST Excel Worksheet Functions 4 September 14th 06 07:09 AM
Calculate a date or key a date on condition Tolo Excel Discussion (Misc queries) 2 June 13th 06 04:16 PM
How do I retrieve a date in a column of dates which > my criteria HNOWSKI Excel Worksheet Functions 0 September 7th 05 07:26 AM
How do I calculate if a date is in a certain time frame? Pe66les Excel Worksheet Functions 19 August 27th 05 11:07 PM
dsum with date criteria Jed Martin Excel Worksheet Functions 0 March 24th 05 05:29 PM


All times are GMT +1. The time now is 08:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"