+ Reply to Thread
Results 1 to 7 of 7

Formula for average of any 2 cells out of 4 cells

  1. #1
    Registered User
    Join Date
    06-26-2012
    Location
    Miami, US
    MS-Off Ver
    Excel 2010
    Posts
    5

    Question Formula for average of any 2 cells out of 4 cells

    i have 4 cells choosen, but only two of them it will have a value entered (could be any 2 of the four cells) , how can Imake a formula displaying the average of the 2 value entered disregarding the other 2 cells (empty or with a pre determined valueo of "zero")
    Hope you can help
    Thanks

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Formula for average of any 2 cells out of 4 cells

    Hi and welcome to the forum

    Try

    =AVERAGEIF(A1:A4,">0")
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    06-26-2012
    Location
    Miami, US
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Formula for average of any 2 cells out of 4 cells

    Fotis , the formula works perfectly , but there is way for the cell with the formula to stay blank while no value was entered yet in the fields, without displaying DIV/0! .. ?
    Thanks

  4. #4
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Formula for average of any 2 cells out of 4 cells

    =IFERROR(fotis's_formula,"")
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Formula for average of any 2 cells out of 4 cells

    Yes there is.

    =IFERROR(AVERAGEIF(A1:A4,">0"),"")

  6. #6
    Registered User
    Join Date
    06-26-2012
    Location
    Miami, US
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Formula for average of any 2 cells out of 4 cells

    Thanks man !!!!

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Formula for average of any 2 cells out of 4 cells

    You are welcome.

    Pls mark your thread as Solved(See at the top of the page to see how to do this)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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