Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Sum based on value between two cells

Hello,
I have 3 fields, Date, OldestDate and Received. I need to sum the values of
Received between, when Date = Oldestdate. For instance below:

I want to sum the range (Received) between 1/12/2009 in the Date field and
1/12/09 in the OldestDate field for a total of 558.


Date OldestDate Received
1/12/2009 12/23/2008 208
1/13/2009 12/23/2008 20
1/14/2009 12/23/2008 44
1/15/2009 12/23/2008 81
1/16/2009 12/23/2008 42
1/19/2009 1/12/2009 163

Thanks.


--
Sherry N.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Sum based on value between two cells

With the query date in D1 try the below formula

=SUM(OFFSET(C1,MATCH(D1,A:A,0)-1,0,MATCH(D1,B:B,0)-MATCH(D1,A:A,0)+1,1))

If this post helps click Yes
---------------
Jacob Skaria


"Sherry N." wrote:

Hello,
I have 3 fields, Date, OldestDate and Received. I need to sum the values of
Received between, when Date = Oldestdate. For instance below:

I want to sum the range (Received) between 1/12/2009 in the Date field and
1/12/09 in the OldestDate field for a total of 558.


Date OldestDate Received
1/12/2009 12/23/2008 208
1/13/2009 12/23/2008 20
1/14/2009 12/23/2008 44
1/15/2009 12/23/2008 81
1/16/2009 12/23/2008 42
1/19/2009 1/12/2009 163

Thanks.


--
Sherry N.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sum based on value between two cells

Sumproduct will also work on this

=SUMPRODUCT(--(A2:A712/1/9),(B2:B712/1/9)*C2:C7)



"Sherry N." wrote:

Hello,
I have 3 fields, Date, OldestDate and Received. I need to sum the values of
Received between, when Date = Oldestdate. For instance below:

I want to sum the range (Received) between 1/12/2009 in the Date field and
1/12/09 in the OldestDate field for a total of 558.


Date OldestDate Received
1/12/2009 12/23/2008 208
1/13/2009 12/23/2008 20
1/14/2009 12/23/2008 44
1/15/2009 12/23/2008 81
1/16/2009 12/23/2008 42
1/19/2009 1/12/2009 163

Thanks.


--
Sherry N.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sum based on value between two cells


On the worksheet use

=SUMPRODUCT(--(A2:A7<=DATEVALUE("1/12/09")),--(A2:A7=DATEVALUE("1/12/09")),C2:C7)


In VABA use
MyTotal =
evalute("SUMPRODUCT(--(A2:A7<=DATEVALUE(""1/12/09"")),--(A2:A7=DATEVALUE(""1/12/09"")),C2:C7)")


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=147914

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 Formatting Based of Cells Based on Data Entry in anoth Jim Excel Discussion (Misc queries) 3 November 11th 08 11:52 PM
display a range of cells editible cells based on matching date Miki Excel Worksheet Functions 0 October 10th 07 03:27 PM
conditional formating cells i Excel based on other cells values Elias Petursson Excel Worksheet Functions 3 May 23rd 06 06:45 PM
Fill cells with color based on criteria in two cells AA Excel Worksheet Functions 2 January 2nd 06 11:29 PM
Auto populate cells based on 2 cells division. Chance224 Excel Discussion (Misc queries) 0 April 4th 05 09:35 PM


All times are GMT +1. The time now is 01:53 PM.

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"