Solved

Sum by Week

Posted on 2016-09-01
5
55 Views
Last Modified: 2016-09-01
Experts,

What would be the formula to sum by week?  
Please see attached.
Weekly-Sum.xlsx
0
Comment
Question by:pdvsa
5 Comments
 
LVL 29

Accepted Solution

by:
Subodh Tiwari (Neeraj) earned 500 total points
ID: 41779550
One way is to create a helper row#3 and then use the following formula in A7 and copy across.
=IF(A3=B3,"",SUMPRODUCT(($A$3:$R$3=A3)*$A$2:$R$2))

Open in new window

Weekly-Sum.xlsx
1
 
LVL 17

Expert Comment

by:xtermie
ID: 41779797
Hi, you can use a combination of weeknum (for which you need Analysis Toolpak) to correctly get the week number of each date entry and then a sumif formula (the weeknum formula can't be used with the SUMPRODUCT formula suggested above).

I suggest doing the following.
You have dates in Row1 and amounts in row 2.
In row 3 create =WEEKNUM(A1) [ copy across this as far as needed ]
In row 4, list all calender weeks (i.e., 1,2,3,4,....) via AutoFill.
In row 5, enter: =SUMIF($A$3:$R$3,A4,$A$2:$R$2) [ copy across as far as needed ]

Hope this helps!
Weekly-Sum_example.xlsx
0
 
LVL 18

Expert Comment

by:Roy_Cox
ID: 41780251
Analysis ToolPak formulas are included in Excel's Functions now, no need to install it.

If the data was vertical instead of horizontal then a PivotTable would be a good solution
0
 

Author Closing Comment

by:pdvsa
ID: 41781061
Nice...very nice.  Thank you!
0
 
LVL 29

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41781065
You're welcome. Glad to help.
Thanks for the feedback.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now