Subtotals (average) working with blank cells

jacobsens

New Member
Joined
Nov 17, 2016
Messages
2
Hi Folks
Trying to create a Subtotal average percentage. So we get new averages based on different filtered criteria. Many of the cells are blank. How ca we generate the subtotal average and ignore those blank/zero cells? My current formula is as follows =SUBTOTAL(101,J7,J8766). Totally appreciate the help!
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Perhaps = AGGREGATE(9,5,j7:j8766)/AGGREGATE(3,5,J7:J8766)
 
Upvote 0
Hi,

Try this
Control+Shift+Enter not just Enter

=AVERAGE(IF(SUBTOTAL(109,OFFSET(J7:J8766,ROW(J7:J8766)-ROW(J7),0,1))>0,J7:J8766))
 
Upvote 0
To ignore zero's while under filter, control+shift+enter, not just enter:

=AVERAGE(IF(SUBTOTAL(2,OFFSET(J7,ROW(J7:J8766)-ROW(J7),0,1)),IF(ISNUMBER(1/J7:J8766),IF(J7:J8766>0,J7:J8766))))
 
Upvote 0
I don't understand....

The Subtotal(101 function will already ignore blanks by design..
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

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