+ Reply to Thread
Results 1 to 10 of 10

Formula to calculate average of every other cell

  1. #1
    Registered User
    Join Date
    10-14-2009
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    18

    Formula to calculate average of every other cell

    Hello,

    I have a row of data starting in cell E4 that could, theoretically, go to the far right end of the spreadsheet. I need to enter a formula in cell D4 that calculates the average of every other cell in this row, starting with E4, that is E4,G4,I4,K4... is this possible?

    Thanks in advance for your assistance
    Last edited by froffel; 11-05-2009 at 02:09 PM.

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

    Re: Formula to calculate average of every other cell

    You can use an Array, eg:

    Please Login or Register  to view this content.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula to calculate average of every other cell

    tRY

    =AVERAGE(IF((MOD(COLUMN(E4:IV4)-COLUMN(E4),2)=0)*(E4:IV4),E4:IV4))

    Confirmed with CTRL+SHIFT+ENTER not just ENTER
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    10-14-2009
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Formula to calculate average of every other cell

    my mistake... was just pressing enter... works like a charm.
    THANKS!!!

  5. #5
    Registered User
    Join Date
    10-14-2009
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Formula to calculate average of every other cell

    in some cases the row contains only zero's giving the formula the result that displays #DIV/0! but i would prefer if it would display just a 0 in this case... is that possible?

    thanks again in advance

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

    Re: Formula to calculate average of every other cell

    Given the nature of the calculation I would opt for

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-14-2009
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Formula to calculate average of every other cell

    thanks... you guys have been a HUGE help... will definitely be clicking that scale, never knew that until i saw your signature... THANKS AGAIN!!!

  8. #8
    Registered User
    Join Date
    10-14-2009
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Formula to calculate average of every other cell

    So I am using this formula (as per previous post in thread)...

    =LOOKUP(9.99999999999999E+307,CHOOSE({1,2},0,AVERAGE(IF(ISNUMBER(E4:IV4)*(MOD(COLUMN(E4:IV4),2)=1),E4:IV4))))
    confirmed with CTRL + SHIFT + ENTER

    But I need to change it up so that the formula is entered into cell E4 and calculates the average of every third cell to the end of the row (i.e. F4, I4, L4...) rather than every second cell and starting in D4 as is above.

    Tried to tinker with the given formula with no luck

    Thanks!

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

    Re: Formula to calculate average of every other cell

    If we assume by every third column you mean from A rather than from E then perhaps:

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    10-14-2009
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Formula to calculate average of every other cell

    yet another swift and perfect response... worked like a charm!!

    thx for all your help

+ 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