multi worksheet average formula excluding zeros

ofwhisenant

New Member
Joined
Feb 27, 2011
Messages
2
I need a formula that will average numbers from five different worksheets. For example cell x11 on sheets 1-5. Also I need it to not include values of zero when it takes the average. Please help I cant seem to figure it out.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
If you are using the same cell across all sheets, try something like this:

=AVERAGE(Sheet1:Sheet5!X11)
 
Upvote 0
I need a formula that will average numbers from five different worksheets. For example cell x11 on sheets 1-5. Also I need it to not include values of zero when it takes the average. Please help I cant seem to figure it out.

Two ways...

1)

=SUM(Sheet1:Sheet5!X11)/INDEX(FREQUENCY(Sheet1:Sheet5!X11,0),2)

2)

Create a range housing the names of the relevant sheets and name this range SheetList, then invoke:

=SUMPRODUCT(SUMIF(INDIRECT("'"&SheetList&"'!X11"),">0"))/MAX(1,SUMPRODUCT(COUNTIF(INDIRECT("'"&SheetList&"'!X11"),">0")))

The first option is faster...
 
Upvote 0
the formula should work are your sheets called sheet1 sheet2 etc?

Also what version of excel are you using as you may be able to use averageif if you have 2007 or later

To ensure you get the sheet names right when placing the formula on sheet1 press the shift button and click on the last sheet before selecting X11 this will get the sheet names right
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,702
Members
452,938
Latest member
babeneker

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