+ Reply to Thread
Results 1 to 5 of 5

Average for non-consecutive cells excluding zeros (even when they all contain zeros)

  1. #1
    Registered User
    Join Date
    10-08-2012
    Location
    Canada, Edmonton
    MS-Off Ver
    excel 2010
    Posts
    9

    Average for non-consecutive cells excluding zeros (even when they all contain zeros)

    Hello,

    i'm trying to get an average # for non-consecutive cells excluding zeros.
    It works just fine, except when the cell range contains ALL zeros, in which case I get a DIV/0 error as a result (Instead of a zero that I would like to get). In every other case it works just fine.
    How can I modify the above formula to work either way, i.e. when some of the cell range values are zeros AND when ALL of the cell range values are zeros...?

    =AVERAGE(IF(E4,E4,{""}),IF(G4,G4,{""}),IF(I4,I4,{""}),IF(K4,K4,{""}),IF(M4,M4,{""}))

    Thanks in advance.

  2. #2
    Forum Contributor
    Join Date
    07-05-2012
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2016
    Posts
    165

    Re: Average for non-consecutive cells excluding zeros (even when they all contain zeros)

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Click on the * icon if this post has been helpful.

  3. #3
    Registered User
    Join Date
    10-08-2012
    Location
    Canada, Edmonton
    MS-Off Ver
    excel 2010
    Posts
    9

    Re: Average for non-consecutive cells excluding zeros (even when they all contain zeros)

    That't it.

    Thanks a lot.

  4. #4
    Forum Contributor
    Join Date
    07-05-2012
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2016
    Posts
    165

    Re: Average for non-consecutive cells excluding zeros (even when they all contain zeros)

    You're welcome.

  5. #5
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Average for non-consecutive cells excluding zeros (even when they all contain zeros)

    Hi
    I know this thread is solved, would this save all the IFS.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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