+ Reply to Thread
Results 1 to 8 of 8

average forumula omitting 0

  1. #1
    Registered User
    Join Date
    09-15-2010
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2003
    Posts
    32

    average forumula omitting 0

    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.

  2. #2
    Valued Forum Contributor
    Join Date
    10-13-2010
    Location
    Sunderland, England
    MS-Off Ver
    Excel 2007 (Home) / 2003 (Work)
    Posts
    740

    Re: average forumula omitting 0

    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?

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,037

    Re: average forumula omitting 0

    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:
    Attached Files Attached Files
    Last edited by zbor; 02-04-2011 at 11:32 AM.
    Never use Merged Cells in Excel

  4. #4
    Registered User
    Join Date
    09-15-2010
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2003
    Posts
    32

    Re: average forumula omitting 0

    =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.

  5. #5
    Registered User
    Join Date
    09-15-2010
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2003
    Posts
    32

    Re: average forumula omitting 0

    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.

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,037

    Re: average forumula omitting 0

    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.

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: average forumula omitting 0

    Quote Originally Posted by CommonCents View Post
    =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.
    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:

    Please Login or Register  to view this content.
    Then use standard 3D Average as outlined by zbor

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    09-15-2010
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2003
    Posts
    32

    Re: average forumula omitting 0

    now that is some good stuff..awesome thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1