Create a Subtotal for each week in the month using the =subtota(9,G2:G6500) formula

Chris Waller

Board Regular
Joined
Jan 18, 2009
Messages
183
Office Version
  1. 365
Platform
  1. Windows
Dear All,

I am using Excel 2010 and the spreadsheet I am working on contains 6,500 rows of data. I am currently using a filter to reduce the output to a certain product and I am using the =subtotal(9,C1:c6500) formula to create a subtotal, however, I would like to know if this formula or another formula can be modified so that I can it will create a subtotal for each week in the month?

TIA
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Care to share a post with some sample data, the conditions and the expected result?
 
Upvote 0
Sorry it has taken a while to get back, but I have been away at a family funeral. The attached list gives an idea of what I am trying to do. In a filtered list I am trying to create a subtotal for each of the weeks on the Spreadsheet. I have used a Sumif formula to create the weekly totals, but this does not work on a filtered list. I wonder if the subtotal formula linked with the product would actually allow me to create a subtotal for each week. I know I could apply the filters to more than one column, however, I was trying to be clever and only apply the filter on the product name and I was hoping that I could use a formula to create a subtotal for each week. Please see filtered list below. If there are any problems, please get back to me.

[TABLE="width: 287"]
<tbody>[TR]
[TD]Product Name[/TD]
[TD]Week[/TD]
[TD]Total[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]02-Oct-17[/TD]
[TD]16.5[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]02-Oct-17[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]02-Oct-17[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]02-Oct-17[/TD]
[TD]37.5[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]09-Oct-17[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]09-Oct-17[/TD]
[TD]7.5[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]09-Oct-17[/TD]
[TD]14[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]09-Oct-17[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]09-Oct-17[/TD]
[TD]1.5[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]16-Oct-17[/TD]
[TD]7.5[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]16-Oct-17[/TD]
[TD]13[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]16-Oct-17[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]16-Oct-17[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]16-Oct-17[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]16-Oct-17[/TD]
[TD]1.25[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]23-Oct-17[/TD]
[TD]18.75[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]23-Oct-17[/TD]
[TD]7.5[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]23-Oct-17[/TD]
[TD]11[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]23-Oct-17[/TD]
[TD]2.5[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]23-Oct-17[/TD]
[TD]2.5[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]23-Oct-17[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]23-Oct-17[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]23-Oct-17[/TD]
[TD]1.25[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]30-Oct-17[/TD]
[TD]15[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]30-Oct-17[/TD]
[TD]7.5[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]30-Oct-17[/TD]
[TD]9.5[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]30-Oct-17[/TD]
[TD]1.25[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]30-Oct-17[/TD]
[TD]2.5[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]30-Oct-17[/TD]
[TD]37.5[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Total for[/TD]
[TD]02-Oct-17[/TD]
[TD="align: right"]57.00[/TD]
[/TR]
[TR]
[TD]Total for[/TD]
[TD]09-Oct-17[/TD]
[TD="align: right"]54.00[/TD]
[/TR]
[TR]
[TD]Total for[/TD]
[TD]16-Oct-17[/TD]
[TD="align: right"]27.75[/TD]
[/TR]
[TR]
[TD]Total for[/TD]
[TD]23-Oct-17[/TD]
[TD="align: right"]50.50[/TD]
[/TR]
[TR]
[TD]Total for[/TD]
[TD]30-Oct-17[/TD]
[TD="align: right"]73.25[/TD]
[/TR]
</tbody><colgroup><col><col><col></colgroup>[/TABLE]
 
Upvote 0
Hi,

No problem. Hope your doing well.
Take a look at this and see if this helps:


Book1
ABCDEF
1Product NameWeekTotalweeknumSum
2Project 12-10-201716,54057
3Project 22-10-20172
4Project 12-10-20171
5Project 12-10-201737,5
6Project 19-10-201730
7Project 19-10-20177,5
8Project 19-10-201714
9Project 19-10-20171
10Project 19-10-20171,5
11Project 116-10-20177,5
12Project 116-10-201713
13Project 116-10-20171
14Project 116-10-20173
15Project 116-10-20172
16Project 116-10-20171,25
17Project 123-10-201718,8
18Project 123-10-20177,5
19Project 123-10-201711
20Project 123-10-20172,5
21Project 123-10-20172,5
22Project 123-10-20174
Sheet1
Cell Formulas
RangeFormula
F2=SUMPRODUCT(--(WEEKNUM(B2:B30+0)=40),SUBTOTAL(109,OFFSET(C2:C30,ROW(C2:C30)-MIN(ROW(C2:C30)),0,1)))
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,190
Members
452,616
Latest member
intern444

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