Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
ruleb
 
Posts: n/a
Default Adding amounts based on a conditional date

How can I sum a range of amounts, each of which has a respective date
associated with it, based on whether or not that date is less than or equal
to a cutoff date (i.e, add together all the amounts that occured between
10/1/05 and 10/31/05?
  #2   Report Post  
Roger Govier
 
Posts: n/a
Default

Hi

One way, assuming your dates to be in column A and your amounts in column B
=SUMPRODUCT(--($A$1:$A$100=DATE(2005,10,1)),--($A$1:$A$100<=DATE(2005,10,31),B1:B100)

Change ranges to suit, but do ensure they are all of equal size.

Regards

Roger Govier



ruleb wrote:

How can I sum a range of amounts, each of which has a respective date
associated with it, based on whether or not that date is less than or equal
to a cutoff date (i.e, add together all the amounts that occured between
10/1/05 and 10/31/05?


  #3   Report Post  
ruleb
 
Posts: n/a
Default

Roger-

Thanks, I see the logic you are using here. However, I am getting an error
message with the formula. I've triple checked everything compared to what
you put in here, but it just isn't working. Is there a paren missing or
anything? Like I said, I understand the logic, but just can't get it
expressed through this formula.

THANKS!

"Roger Govier" wrote:

Hi

One way, assuming your dates to be in column A and your amounts in column B
=SUMPRODUCT(--($A$1:$A$100=DATE(2005,10,1)),--($A$1:$A$100<=DATE(2005,10,31),B1:B100)

Change ranges to suit, but do ensure they are all of equal size.

Regards

Roger Govier



ruleb wrote:

How can I sum a range of amounts, each of which has a respective date
associated with it, based on whether or not that date is less than or equal
to a cutoff date (i.e, add together all the amounts that occured between
10/1/05 and 10/31/05?



  #4   Report Post  
Roger Govier
 
Posts: n/a
Default

Hi

Yes, you are right, I missed out a closing parenthesis.
Try

=SUMPRODUCT(--($A$1:$A$100=DATE(2005,10,1)),--($A$1:$A$100<=DATE(2005,10,31)),B1:B100)


Regards

Roger Govier



ruleb wrote:

Roger-

Thanks, I see the logic you are using here. However, I am getting an error
message with the formula. I've triple checked everything compared to what
you put in here, but it just isn't working. Is there a paren missing or
anything? Like I said, I understand the logic, but just can't get it
expressed through this formula.

THANKS!

"Roger Govier" wrote:



Hi

One way, assuming your dates to be in column A and your amounts in column B
=SUMPRODUCT(--($A$1:$A$100=DATE(2005,10,1)),--($A$1:$A$100<=DATE(2005,10,31),B1:B100)

Change ranges to suit, but do ensure they are all of equal size.

Regards

Roger Govier



ruleb wrote:



How can I sum a range of amounts, each of which has a respective date
associated with it, based on whether or not that date is less than or equal
to a cutoff date (i.e, add together all the amounts that occured between
10/1/05 and 10/31/05?




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
Conditional Formating Based on Date Roy Excel Discussion (Misc queries) 5 June 7th 06 04:49 PM
52 week average based on date tomandrobyn Excel Discussion (Misc queries) 5 June 3rd 05 07:34 PM
Conditional Formatting Based on Date John F.M. Excel Discussion (Misc queries) 1 June 2nd 05 08:14 PM
conditional formatting based on column snax500 Excel Discussion (Misc queries) 4 April 27th 05 06:13 PM
Conditional Formatting (Date vs Number) [email protected] Excel Discussion (Misc queries) 7 December 20th 04 10:23 PM


All times are GMT +1. The time now is 12:28 AM.

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

About Us

"It's about Microsoft Excel"