+ Reply to Thread
Results 1 to 7 of 7

Averages of nonconsecutive cells including zeros.

  1. #1
    Registered User
    Join Date
    01-25-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    37

    Averages of nonconsecutive cells including zeros.

    Hello all,
    I am trying to average cells E2 and G2 and if one is a zero factor that into the formula. The formula is in I2 and the formula must exclude whatever is in F2 and H2.

    I have tried a plethora of formulas and I cannot get one to work. I think I have spent too long trying to fix it so some fresh ideas would be greatly received. I also note that the formulas I have tried have returned a DIV0! Error in blank cells.

    Many thanks,

    PER11

  2. #2
    Forum Contributor
    Join Date
    06-28-2016
    Location
    Pennsylvania, USA
    MS-Off Ver
    2013
    Posts
    308

    Re: Averages of nonconsecutive cells including zeros.

    try:

    Please Login or Register  to view this content.

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Averages of nonconsecutive cells including zeros.

    Use AVERAGE function
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Registered User
    Join Date
    01-25-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Averages of nonconsecutive cells including zeros.

    Thank you for all your help.

    The formula I ended up with was
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    . The average E2,G2 function returned a divide by 0 error.

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Averages of nonconsecutive cells including zeros.

    How about trying the formulas that were actually suggested?

    like
    =(E2+G2)/2
    and
    =AVERAGE(E2,G2)

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Averages of nonconsecutive cells including zeros.

    If your formula returned #Div/0!, that suggests that this part resulted in 0
    ((E2<>0)+(G2<>0))

    And that would suggest that both E2 and G2 are either 0 or Blank.

    To handle that issue, to return "" when those cells are blank, try iferror
    =IFERROR(AVERAGE(E2,G2),"")
    or
    =IFERROR((E2+G2)/2,"")

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Averages of nonconsecutive cells including zeros.

    I think this part of your original post has confused everyone.
    I am trying to average cells E2 and G2 and if one is a zero factor that into the formula.
    The way that reads, it means you want 0's to be INCLUDED in the average.
    So an average of say 4 and 0 would be 2... (4+0)/2


    Did you really mean that 0's should NOT be included in the average?
    So an average of 4 and 0 would be 4... (4+0)/1


    And also this part
    must exclude whatever is in F2 and H2
    What exactly is in F2 and H2 ? If it's NOT numeric, then an average function would ignore them by design.
    If they ARE numeric, then is there anything else that can be used as a key to determine which cells to include (or exclude) in the average?
    For example, a specific Header Text string. So we could say something like Average E2:G2 IF the Text in E1:G1 = "x" (or whatever) ?


    Perhaps you could attach a sample file?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Referencing a cell to two nonconsecutive cells in a different tab
    By rgiraud2 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-03-2014, 09:23 AM
  2. calculating average in cells, not including zeros
    By kingy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-23-2014, 03:00 AM
  3. Including averages logic into IF formulas
    By ExcelRookieATX in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-21-2014, 06:26 PM
  4. Replies: 5
    Last Post: 04-09-2012, 02:28 PM
  5. Calculate averages not including zero values
    By rmellison in forum Excel General
    Replies: 6
    Last Post: 07-06-2006, 11:21 AM
  6. [SOLVED] Re: averages without including zero values
    By Norman Jones in forum Excel General
    Replies: 3
    Last Post: 12-15-2005, 04:50 AM
  7. averages without including zero values
    By lighting in forum Excel General
    Replies: 1
    Last Post: 12-15-2005, 03:31 AM

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