SUM by week

Skybluekid

Well-known Member
Joined
Apr 17, 2012
Messages
840
Hi All,

I have a sheet that has data as follows

Week 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

Data 60 62 52 42 42 78 75 79 80 50 61 66 72 79 23 8 8

What I need is to sum the range according to the week number. For example, If it is week 14, I would like to sum the range upto an including that week. But I would like to be done automatic so that when the week changes the sum range will automatically update to that week.

Thanks in advance
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Snakehips

Well-known Member
Joined
May 17, 2009
Messages
5,561
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Skybluekid,

Perhaps something like this....


Excel 2007
ABCDEFGHIJKLMNOPQ
1SUM921
2
31234567891011121314151617
460625242427875798050616672792388
Sheet1
Cell Formulas
RangeFormula
B1=SUMIF($A$3:$AZ$3,"<="&WEEKNUM(TODAY()),$A$4:$AZ$4)


Alter the ranges to suit. If your week numbers are not strickly in line with the weeks of the year then you can add a + or - adjustment to the formula.

Hope that helps.
 

Akashwani

Well-known Member
Joined
Mar 14, 2009
Messages
2,911
Hi,

Does this work?....

Excel Workbook
ABCDEFGHIJKLMNOPQRS
1Week1234567891011121314151617
2Data60625242427875798050616672792388
3
4
5Week14
6Result898
7
Sheet3


I hope that helps.

Ak
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,280
Messages
5,836,370
Members
430,424
Latest member
ALHK022

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top