i am trying to figure a formula to average numbers from 5 sheets in cell a1 but not count a value of 0.
if anyone could help it would be greatly appreciated. thank you.
i am trying to figure a formula to average numbers from 5 sheets in cell a1 but not count a value of 0.
if anyone could help it would be greatly appreciated. thank you.
Last edited by CommonCents; 02-04-2011 at 12:47 PM.
Presumably you have something along the lines of:
=SUM(Sheet1!A1,Sheet2!A1,Sheet3!A1,Sheet4!A1,Sheet5!A1)/5
If you change that to
=SUM(Sheet1!A1,Sheet2!A1,Sheet3!A1,Sheet4!A1,Sheet5!A1)/(SUM(IF(Sheet1!A1=0,0,1),IF(Sheet2!A1=0,0,1),IF(Sheet3!A1=0,0,1),IF(Sheet4!A1=0,0,1),IF(Sheet5!A1=0,0,1)))
that should work?
Name first sheet as START and last sheet as END and then use this formula: =AVERAGE(START:END!A1)
This won't calculate EMPTY cell but will calculate 0 in a cell.
That seems reasonable.
If you getting 0 and want to exclude it you can use IF statement to avoid 0 instead of blank cell in your sheets.
Check example:
Last edited by zbor; 02-04-2011 at 11:32 AM.
Never use Merged Cells in Excel
=AVERAGE(IF('0103:END'!N6<>1,'0103:END'!N6,"")) that is the formula i figured but I am getting a REF error so I don't know what is wrong.
can you put that in a sheet and see if i am reffing something wrong? 0103 is my "START" sheet, and I want to omit all cells that return 1 and nothing else...seems like that should work but i'm gettinga big FAIL on that.
You using wrong formula...
YXou must avoid 0's at the way I've told you.
Last edited by zbor; 02-04-2011 at 12:26 PM.
You can't conduct conditional calcs along the lines of the above without introducing SUMPRODUCT, INDIRECT etc... you would need to list all sheet names for inclusion in a range for reference.
Needless to say this approach is cumbersome, inefficient & volatile
Given the above I would suggest you use an additional cell (identical) on all sheets, eg: O6 - and implement a basic formula along the lines of:
Then use standard 3D Average as outlined by zbor![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
now that is some good stuff..awesome thank you.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks