problems using subtotals for averages and median issues

surbannomad

New Member
Joined
Oct 5, 2020
Messages
4
Office Version
  1. 2019
Platform
  1. Windows
Hi Everyone,

Learnt so much from the site and the advice you guys give..but cound'nt find an answer to a problem that I am facing....here goes

I have a column numbers of staff. I am currently using

=SUMPRODUCT(('SE A+B + CODED'!$AP:$AP>=1)*('SE A+B + CODED'!$AP:$AP<=5)*(SUBTOTAL(3,OFFSET('SE A+B + CODED'!$AP:$AP,ROW('SE A+B + CODED'!$AP:$AP)-MIN(ROW('SE A+B + CODED'!$AP:$AP)),0,1))))

=SUMPRODUCT(('SE A+B + CODED'!$AP:$AP>=1)*('SE A+B + CODED'!$AP:$AP<=5)*(SUBTOTAL(103,OFFSET('SE A+B + CODED'!$AP:$AP,ROW('SE A+B + CODED'!$AP:$AP)-MIN(ROW('SE A+B + CODED'!$AP:$AP)),0,1))))

which work well and produce the counts figures that I require using the multiple criteria...no problem showing the hidden and visisble, and visible only counts. Problem I am facing is that I need to do average staff per range on the same column and median staff per range. In case of averages I have used:

=SUMPRODUCT(('SE A+B + CODED'!$AP:$AP>=1)*('SE A+B + CODED'!$AP:$AP<=5)*(SUBTOTAL(1,OFFSET('SE A+B + CODED'!$AP:$AP,ROW('SE A+B + CODED'!$AP:$AP)-MIN(ROW('SE A+B + CODED'!$AP:$AP)),0,1))))

=SUMPRODUCT(('SE A+B + CODED'!$AP:$AP>=1)*('SE A+B + CODED'!$AP:$AP<=5)*(SUBTOTAL(101,OFFSET('SE A+B + CODED'!$AP:$AP,ROW('SE A+B + CODED'!$AP:$AP)-MIN(ROW('SE A+B + CODED'!$AP:$AP)),0,1))))

but I am not getting any values back only getting #DIV appearing in cells. Need your help on this formuale

For Median I am informed by your site that I can use subtotals as per range.... any suggestions for work around....still using subtotal inside statement as I need to difefrentiate from visible and hidden + visible your guidance and help would be gratefully appreciated.......
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,214,375
Messages
6,119,170
Members
448,870
Latest member
max_pedreira

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