Hoube78

New Member
Joined
Mar 27, 2014
Messages
43
Hi,

I have a data set like below and need to create a subtotal of the sections. I cant use the sum if function as the table will be filtered and need the section subtotals to be dynamic in line with the table filter.

The filters are setup for BRAND,REGION,AREA and SITE. The idea is I have a separate chart which subtotals as the user applies filters

Any help please?

Thanks in Advance

Col A
Col B
Col C
Col D
Col E
Col F
Col G
Col H
BRAND
REGION
AREA
SITE
SITE NO
SECTION NAME
RC 1 RESULTS
RC 2 RESULTS
client 1
North
Taz
Beds
01
CASH
80%
91%
client 1
North
Taz
Beds
01
REVENUE
95%
82%
client 1
North
Taz
HULL
02
CASH
81%
83%
client 1
North
Taz
HULL
02
REVENUE
58%
94%
client 1
US
BILL
NY
03
CASH
60%
99%
client 1
US
BILL
NY
03
REVENUE
78%

<tbody>
</tbody>
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hi,

Thanks but this wont solve my issue for getting the section results?

I would normally do sumif(CASH,COL F)

However this wont be dynamic when the table is filtered as it will include hidden rows.

I think i need to use sumproducts and then subtotal with an array?

However having never used array before i'm really lost.

Thanks for the idea
J
 
Upvote 0
Hi,

Sorry i thought i had,

I need the section subtotals which are located in colum F and the subtotal of the result RC - 1.

i basically have a sub table with the section names in (col A) which i would normally use if i was using sumif and reference this as to what excel needs to look for if i was using sumif. Which im not sure you can do with subtotal with an if clause?

let me know if the above is not enough info?

Thanks,
John
 
Upvote 0
Hi,

Sorry i thought i had,

I need the section subtotals which are located in colum F and the subtotal of the result RC - 1.

i basically have a sub table with the section names in (col A) which i would normally use if i was using sumif and reference this as to what excel needs to look for if i was using sumif. Which im not sure you can do with subtotal with an if clause?

let me know if the above is not enough info?

Thanks,
John

Are you wanting to sum RC-1 RESULTS while filter(s) are applied? If so, what are the additional conditions?
 
Upvote 0
Hi yes I want to no the average of result of RC - 1.

The table would be filtered by Region, Area and site. The plan is that as the user applies the filters they would get the result for Cash and Revenue.

If i use subtotal on the RC-1 this would work with filters but would only give me the overall average and I need to know the average broken down into sections e.g. Cash and Revenue.

At the moment I'm using subtotal with option 9 (average) on Columns G and H but need to get the average for Cash and Revenue e.g. adding an if clause.

Thanks,
J
 
Upvote 0
Hi

Without filters
Cash RC -1 =74%
Revenue RC - 1 =77%

With filter applied for Area and Taz selected
Cash RC -1 =80%
Revenue RC - 1 =76%

With filter applied by Region and US selected
Cash RC -1 =60%
Revenue RC - 1 =78%


Let me know if you want more?

Thanks,
John
 
Upvote 0
Hi

Without filters
Cash RC -1 =74%
Revenue RC - 1 =77%

With filter applied for Area and Taz selected
Cash RC -1 =80%
Revenue RC - 1 =76%

With filter applied by Region and US selected
Cash RC -1 =60%
Revenue RC - 1 =78%


Let me know if you want more?

Thanks,
John

Control+shift+enter, not just enter:
Rich (BB code):
=AVERAGE(IF(SUBTOTAL(2,OFFSET(G2,ROW(G2:G7)-ROW(G2),0,1)),
    IF(C2:C7="Taz",IF($F$2:$F$7="cash",G2:G7))))

Rich (BB code):
=AVERAGE(IF(SUBTOTAL(2,OFFSET(G2,ROW(G2:G7)-ROW(G2),0,1)),
    IF(C2:C7="Taz",IF($F$2:$F$7="revenue",G2:G7))))

Rich (BB code):
=AVERAGE(IF(SUBTOTAL(2,OFFSET(G2,ROW(G2:G7)-ROW(G2),0,1)),
    IF(B2:B7="US",IF($F$2:$F$7="cash",G2:G7))))

Rich (BB code):
=AVERAGE(IF(SUBTOTAL(2,OFFSET(G2,ROW(G2:G7)-ROW(G2),0,1)),
    IF(B2:B7="US",IF($F$2:$F$7="revenue",G2:G7))))
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,264
Members
449,075
Latest member
staticfluids

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