Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Michael
 
Posts: n/a
Default Sum based on date range

Columns represent days of the month (E2 is day 1, F2 is day 2, etc), rows
represent dollar amounts (E3 is $ amt for day one, F3 is $ amt fo day 2, etc.)
How can I sum the rows based on a begin and end date?
Example: Begin date is March 10, end date is March 15, I need row 3 summed
for the range of columns that are within the from and to date range.

3/1 3/2 3/3 3/4 etc.
category 1 50.00 5.00 2.00 3.50
category 2 1.00 10.00 .75 .25

I need the formula result to show on another sheet in one column for each
row, I suppose I could just copy the formula down the column.

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
Toppers
 
Posts: n/a
Default Sum based on date range

Assuming Sheet2 has Category1, Category2 etc in column A, then in column B put:

=SUMPRODUCT(--(Sheet1!$B$1:$W$1=DATE(2006,3,3)),--(Sheet1!$B$1:$W$1<=DATE(2006,3,20)),--(Sheet1!B2:W2))

for period 3rd to 20th march 2006 inclusive


<b1:w1 contain dates
<b2:w2 contain amounts (for category 1)

Copy down as required

HTH

"Michael" wrote:

Columns represent days of the month (E2 is day 1, F2 is day 2, etc), rows
represent dollar amounts (E3 is $ amt for day one, F3 is $ amt fo day 2, etc.)
How can I sum the rows based on a begin and end date?
Example: Begin date is March 10, end date is March 15, I need row 3 summed
for the range of columns that are within the from and to date range.

3/1 3/2 3/3 3/4 etc.
category 1 50.00 5.00 2.00 3.50
category 2 1.00 10.00 .75 .25

I need the formula result to show on another sheet in one column for each
row, I suppose I could just copy the formula down the column.

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.misc
Michael
 
Posts: n/a
Default Sum based on date range

Thanks, I was able to get that to work for one sheet then hit another snag...
There is a worksheet for each month of the year and I am trying to sum on a
13th sheet. I am having trouble creating ranges in the formula that span the
12 monthly worksheets. BTW, the assumption below is correct but it is on
sheet 13. Should I or could I used named ranges to accomplish the
multi-sheet dilemma?

"Toppers" wrote:

Assuming Sheet2 has Category1, Category2 etc in column A, then in column B put:

=SUMPRODUCT(--(Sheet1!$B$1:$W$1=DATE(2006,3,3)),--(Sheet1!$B$1:$W$1<=DATE(2006,3,20)),--(Sheet1!B2:W2))

for period 3rd to 20th march 2006 inclusive


<b1:w1 contain dates
<b2:w2 contain amounts (for category 1)

Copy down as required

HTH

"Michael" wrote:

Columns represent days of the month (E2 is day 1, F2 is day 2, etc), rows
represent dollar amounts (E3 is $ amt for day one, F3 is $ amt fo day 2, etc.)
How can I sum the rows based on a begin and end date?
Example: Begin date is March 10, end date is March 15, I need row 3 summed
for the range of columns that are within the from and to date range.

3/1 3/2 3/3 3/4 etc.
category 1 50.00 5.00 2.00 3.50
category 2 1.00 10.00 .75 .25

I need the formula result to show on another sheet in one column for each
row, I suppose I could just copy the formula down the column.

Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.misc
Toppers
 
Posts: n/a
Default Sum based on date range

Michael,
How do we handle the date ranges for each sheet? It appears
we will need a fomula for each month as the dates will (obviously) be
diferent.

"Michael" wrote:

Thanks, I was able to get that to work for one sheet then hit another snag...
There is a worksheet for each month of the year and I am trying to sum on a
13th sheet. I am having trouble creating ranges in the formula that span the
12 monthly worksheets. BTW, the assumption below is correct but it is on
sheet 13. Should I or could I used named ranges to accomplish the
multi-sheet dilemma?

"Toppers" wrote:

Assuming Sheet2 has Category1, Category2 etc in column A, then in column B put:

=SUMPRODUCT(--(Sheet1!$B$1:$W$1=DATE(2006,3,3)),--(Sheet1!$B$1:$W$1<=DATE(2006,3,20)),--(Sheet1!B2:W2))

for period 3rd to 20th march 2006 inclusive


<b1:w1 contain dates
<b2:w2 contain amounts (for category 1)

Copy down as required

HTH

"Michael" wrote:

Columns represent days of the month (E2 is day 1, F2 is day 2, etc), rows
represent dollar amounts (E3 is $ amt for day one, F3 is $ amt fo day 2, etc.)
How can I sum the rows based on a begin and end date?
Example: Begin date is March 10, end date is March 15, I need row 3 summed
for the range of columns that are within the from and to date range.

3/1 3/2 3/3 3/4 etc.
category 1 50.00 5.00 2.00 3.50
category 2 1.00 10.00 .75 .25

I need the formula result to show on another sheet in one column for each
row, I suppose I could just copy the formula down the column.

Thanks!

  #5   Report Post  
Posted to microsoft.public.excel.misc
Michael
 
Posts: n/a
Default Sum based on date range

There are 12 sheets, one for each month. Row one has the days of the month,
column A contains the categories and to the right of the categories and under
each day of the month values are entered throughout the month for each day.

Sheet one row one contains the dates 1/1/06 through 1/31/06
Sheet two row one contains the dates 2/1/06 through 2/28/06
etc. through sheet twelve. The sheets are named jan, feb, mar, etc.
Sheet 13 would summarize the category values based on a from and to date
range which may cross over more than one sheet but not three.

"Toppers" wrote:

Michael,
How do we handle the date ranges for each sheet? It appears
we will need a fomula for each month as the dates will (obviously) be
diferent.

"Michael" wrote:

Thanks, I was able to get that to work for one sheet then hit another snag...
There is a worksheet for each month of the year and I am trying to sum on a
13th sheet. I am having trouble creating ranges in the formula that span the
12 monthly worksheets. BTW, the assumption below is correct but it is on
sheet 13. Should I or could I used named ranges to accomplish the
multi-sheet dilemma?

"Toppers" wrote:

Assuming Sheet2 has Category1, Category2 etc in column A, then in column B put:

=SUMPRODUCT(--(Sheet1!$B$1:$W$1=DATE(2006,3,3)),--(Sheet1!$B$1:$W$1<=DATE(2006,3,20)),--(Sheet1!B2:W2))

for period 3rd to 20th march 2006 inclusive


<b1:w1 contain dates
<b2:w2 contain amounts (for category 1)

Copy down as required

HTH

"Michael" wrote:

Columns represent days of the month (E2 is day 1, F2 is day 2, etc), rows
represent dollar amounts (E3 is $ amt for day one, F3 is $ amt fo day 2, etc.)
How can I sum the rows based on a begin and end date?
Example: Begin date is March 10, end date is March 15, I need row 3 summed
for the range of columns that are within the from and to date range.

3/1 3/2 3/3 3/4 etc.
category 1 50.00 5.00 2.00 3.50
category 2 1.00 10.00 .75 .25

I need the formula result to show on another sheet in one column for each
row, I suppose I could just copy the formula down the column.

Thanks!



  #6   Report Post  
Posted to microsoft.public.excel.misc
Toppers
 
Posts: n/a
Default Sum based on date range

As an example, for dates 13th Feb to 20th March inclusive this would provide
a (relatively) simple solution:

=SUMPRODUCT(--(Feb!$B$1:$W$1=DATE(2006,2,13)),--(Feb1!$B$1:$W$1<=DATE(2006,2,28)),--(Feb!B2:W2)) +
=SUMPRODUCT(--(Mar!$B$1:$W$1=DATE(2006,3,1)),--(Mar!$B$1:$W$1<=DATE(2006,3,20)),--(Mar!B2:W2))

There may be a more "sophisticated" formula but I wouldn't know how to
construct it.

Is this exceptable?

"Michael" wrote:

There are 12 sheets, one for each month. Row one has the days of the month,
column A contains the categories and to the right of the categories and under
each day of the month values are entered throughout the month for each day.

Sheet one row one contains the dates 1/1/06 through 1/31/06
Sheet two row one contains the dates 2/1/06 through 2/28/06
etc. through sheet twelve. The sheets are named jan, feb, mar, etc.
Sheet 13 would summarize the category values based on a from and to date
range which may cross over more than one sheet but not three.

"Toppers" wrote:

Michael,
How do we handle the date ranges for each sheet? It appears
we will need a fomula for each month as the dates will (obviously) be
diferent.

"Michael" wrote:

Thanks, I was able to get that to work for one sheet then hit another snag...
There is a worksheet for each month of the year and I am trying to sum on a
13th sheet. I am having trouble creating ranges in the formula that span the
12 monthly worksheets. BTW, the assumption below is correct but it is on
sheet 13. Should I or could I used named ranges to accomplish the
multi-sheet dilemma?

"Toppers" wrote:

Assuming Sheet2 has Category1, Category2 etc in column A, then in column B put:

=SUMPRODUCT(--(Sheet1!$B$1:$W$1=DATE(2006,3,3)),--(Sheet1!$B$1:$W$1<=DATE(2006,3,20)),--(Sheet1!B2:W2))

for period 3rd to 20th march 2006 inclusive


<b1:w1 contain dates
<b2:w2 contain amounts (for category 1)

Copy down as required

HTH

"Michael" wrote:

Columns represent days of the month (E2 is day 1, F2 is day 2, etc), rows
represent dollar amounts (E3 is $ amt for day one, F3 is $ amt fo day 2, etc.)
How can I sum the rows based on a begin and end date?
Example: Begin date is March 10, end date is March 15, I need row 3 summed
for the range of columns that are within the from and to date range.

3/1 3/2 3/3 3/4 etc.
category 1 50.00 5.00 2.00 3.50
category 2 1.00 10.00 .75 .25

I need the formula result to show on another sheet in one column for each
row, I suppose I could just copy the formula down the column.

Thanks!

  #7   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom
 
Posts: n/a
Default Sum based on date range

With your sheet named Jan - Dec the dates in question lower date in A1 and
upper date in B1 on the summary sheet

=SUMPRODUCT(SUMIF(INDIRECT("'"&{"Jan";"Feb";"Mar"; "Apr";"May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov";"D ec"}&"'!1:1"),"="&A1,INDIRECT("'"&{"Jan";"Feb";"M ar";"Apr";"May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov ";"Dec"}&"'!3:3")))-SUMPRODUCT(SUMIF(INDIRECT("'"&{"Jan";"Feb";"Mar";" Apr";"May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov";"De c"}&"'!1:1"),""&B1,INDIRECT("'"&{"Jan";"Feb";"Mar ";"Apr";"May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov"; "Dec"}&"'!3:3")))

if the sheet names are in the range J1:J12

=SUMPRODUCT(SUMIF(INDIRECT("'"&J1:J12&"'!1:1"),"= "&A1,INDIRECT("'"&J1:J12&"'!3:3")))-SUMPRODUCT(SUMIF(INDIRECT("'"&J1:J12&"'!1:1"),""& B1,INDIRECT("'"&J1:J12&"'!3:3")))

both formulas sum row 3, change the 3:3 to another row for another category,
you could let a formula do that as well, assume you have a list of
categories in the summary sheet called MyList and you put the category in C1

=SUMPRODUCT(SUMIF(INDIRECT("'"&J1:J12&"'!1:1"),"= "&A1,INDIRECT("'"&J1:J12&"'!"&MATCH(C1,MyList,0)&" :"&MATCH(C1,MyList,0))))-SUMPRODUCT(SUMIF(INDIRECT("'"&J1:J12&"'!1:1"),""& B1,INDIRECT("'"&J1:J12&"'!"&MATCH(C1,MyList,0)&":" &MATCH(C1,MyList,0))))



-

Regards,

Peo Sjoblom



"Michael" wrote in message
...
There are 12 sheets, one for each month. Row one has the days of the
month,
column A contains the categories and to the right of the categories and
under
each day of the month values are entered throughout the month for each
day.

Sheet one row one contains the dates 1/1/06 through 1/31/06
Sheet two row one contains the dates 2/1/06 through 2/28/06
etc. through sheet twelve. The sheets are named jan, feb, mar, etc.
Sheet 13 would summarize the category values based on a from and to date
range which may cross over more than one sheet but not three.

"Toppers" wrote:

Michael,
How do we handle the date ranges for each sheet? It
appears
we will need a fomula for each month as the dates will (obviously) be
diferent.

"Michael" wrote:

Thanks, I was able to get that to work for one sheet then hit another
snag...
There is a worksheet for each month of the year and I am trying to sum
on a
13th sheet. I am having trouble creating ranges in the formula that
span the
12 monthly worksheets. BTW, the assumption below is correct but it is
on
sheet 13. Should I or could I used named ranges to accomplish the
multi-sheet dilemma?

"Toppers" wrote:

Assuming Sheet2 has Category1, Category2 etc in column A, then in
column B put:

=SUMPRODUCT(--(Sheet1!$B$1:$W$1=DATE(2006,3,3)),--(Sheet1!$B$1:$W$1<=DATE(2006,3,20)),--(Sheet1!B2:W2))

for period 3rd to 20th march 2006 inclusive


<b1:w1 contain dates
<b2:w2 contain amounts (for category 1)

Copy down as required

HTH

"Michael" wrote:

Columns represent days of the month (E2 is day 1, F2 is day 2,
etc), rows
represent dollar amounts (E3 is $ amt for day one, F3 is $ amt fo
day 2, etc.)
How can I sum the rows based on a begin and end date?
Example: Begin date is March 10, end date is March 15, I need row 3
summed
for the range of columns that are within the from and to date
range.

3/1 3/2 3/3 3/4 etc.
category 1 50.00 5.00 2.00 3.50
category 2 1.00 10.00 .75 .25

I need the formula result to show on another sheet in one column
for each
row, I suppose I could just copy the formula down the column.

Thanks!



  #8   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default Sum based on date range

Hi!

One way:

=SUMPRODUCT((D3:D7="category
3")*(E2:AI2=--"3/10/2006")*(E2:AI2<=--"3/15/2006"),E3:AI7)

Biff

"Michael" wrote in message
...
Columns represent days of the month (E2 is day 1, F2 is day 2, etc), rows
represent dollar amounts (E3 is $ amt for day one, F3 is $ amt fo day 2,
etc.)
How can I sum the rows based on a begin and end date?
Example: Begin date is March 10, end date is March 15, I need row 3 summed
for the range of columns that are within the from and to date range.

3/1 3/2 3/3 3/4 etc.
category 1 50.00 5.00 2.00 3.50
category 2 1.00 10.00 .75 .25

I need the formula result to show on another sheet in one column for each
row, I suppose I could just copy the formula down the column.

Thanks!



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
how to check if date falls within range Bharat Saboo Excel Worksheet Functions 4 December 30th 05 10:31 AM
Computing a date range roy.okinawa Excel Worksheet Functions 7 November 15th 05 12:45 AM
Help PLEASE! Not sure what answer is: Match? Index? Other? baz Excel Worksheet Functions 7 September 3rd 05 03:47 PM
Formula to determine a future date based on criteria David Excel Worksheet Functions 2 December 15th 04 07:51 PM
Need to find Min value based on date range entered Chad S Excel Worksheet Functions 1 October 28th 04 09:52 AM


All times are GMT +1. The time now is 03:30 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"