Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Formula help needed please

Excel 2010. I have a database containing one line for each date and several columns corresponding to that date. I am trying to create a table that shows the totals in each column for each WEEK of 2013. ie the totals for Jan. 1 through January 7 and so on. I know the sumif formula but am not sure how to total it on a weekly basis. Any help would be appreciated.

Thanks in advance... Bob
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default Formula help needed please

Hi Bob,

Am Thu, 27 Dec 2012 09:47:12 -0800 (PST) schrieb Bob Newman:

Excel 2010. I have a database containing one line for each date and several columns corresponding to that date. I am trying to create a table that shows the totals in each column for each WEEK of 2013. ie the totals for Jan. 1 through January 7 and so on. I know the sumif formula but am not sure how to total it on a weekly basis. Any help would be appreciated.


your date in column A, your values in column B then in C2:
=SUM(IF($A$2:$A$367<"",(TRUNC(($A$2:$A$367-WEEKDAY($A$2:$A$367,2)-DATE(YEAR($A$2:$A$367+4-WEEKDAY($A$2:$A$367,2)),1,-10))/7)=ROW(A1))*(YEAR($A$2:$A$367)=2012)*$B$2:$B$367))
Enter the array formula with CTRL+Shift+ Enter and copy down


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 151
Default Formula help needed please

You could also try it this way:

Column A = Your Dates
Column B - Week No. =TRUNC((($A2-DATE(YEAR($A2),1,0))+6)/7)
Column C = Your Values

Anywhere in your workbook you can have something like the following:

Week .1 =SUMPRODUCT(($B$2:$B$367=1)*($C$2:$C$367))
Week .2 =SUMPRODUCT(($B$2:$B$367=2)*($C$2:$C$367))
Week .3 =SUMPRODUCT(($B$2:$B$367=3)*($C$2:$C$367))
.....
....
...
..
Week .53 =SUMPRODUCT(($B$2:$B$367=53)*($C$2:$C$367))

An extra week, just in case... :)

HTH
Mick.
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
Formula needed dhstein Excel Discussion (Misc queries) 4 January 21st 10 02:27 AM
Look Up Formula Help Needed Deepak New Users to Excel 3 December 30th 08 12:14 AM
Excel formula to copy/paste formula needed please. colwyn Excel Discussion (Misc queries) 4 October 22nd 08 11:27 PM
Formula Help Needed FordFiestaST150 Excel Worksheet Functions 1 November 3rd 06 08:41 AM
Formula needed JUAN Excel Programming 7 May 28th 04 07:37 PM


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