Auto Sum an Additional Row Weekly

gweno

New Member
Joined
Aug 16, 2011
Messages
8
I have a set of sales forecast data. Column A would be the weeks (1-52), column B would be the forecast dollars for Orange sales, column C for Peach sales, Column D for Apple sales and column E for Pears. After 13 weeks, the spreadsheet sums the weeks by quarter total dollars so that row might need to be eliminated (ie cell B15 would be a sum of wk 1-13, B16 would be wk 14 sales, after the 2nd qtr another row sums up the 2nd qtr sales,etc). I have a Counter cell which I update which week we are in. So if I'm in week 18, I have a cell that needs the results of Orange, Peach, Apple and Pear forecast sales on a quarterly basis (wks 14-18 in that example) and another cell is looking for the results for the year to date (wks 1-18). I made up that example, but there will be situations in which I might need the result to be just the sum of Peaches (column C) and sometimes I might need to add 2 or more columns for the result (sum of peaches and pears on qtrly and ytd basis for example).

I have the same data below times multiple locations. I think I might need VB code.

I appreciate any help you can give me and I hope this makes sense!

excel_example.jpg
 
CHOOSE(INT(($F$8-1)/13)+1,0,B$15,B$29,B$43)
F8 should be the cell with the week number

CHOOSE(INT(($F$8-1)/13)+1,0,B$15,B$29,B$43)
B$15,B$29,B$43 should be the cells with the quarterly subtotals.

Is this correct for your configuration?
 
Upvote 0

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
I went back to the basics w/ the fruit and same results.. I copied/pasted the exact formula
:confused:

I was wrong about the example of wk 37- the result is Qtr 1 (not 2) plus weeks 27-37.


here is my formula... I moved the counter
=SUMPRODUCT(--($A$2:$A$56<>"Total"),--($A$2:$A$56<=$A$58),B$2:B$56)-CHOOSE(INT(($A$58-1)/13)+1,0,B$15,B$29,B$43)
 
Last edited:
Upvote 0
Try this instead...
Code:
=SUMPRODUCT(--($A$2:$A$56<>"Total"),--($A$2:$A$56<=$A$58),B$2:B$56)
 -SUMPRODUCT(--($A$2:$A$56<>"Total"),--($A$2:$A$56<=(INT(($A$58-1)/13)*13)),B$2:B$56)
 
Upvote 0

Forum statistics

Threads
1,225,156
Messages
6,183,239
Members
453,152
Latest member
ChrisMd

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
Back
Top