+ Reply to Thread
Results 1 to 9 of 9

Running average formula (in same cell)

  1. #1
    Forum Contributor
    Join Date
    02-08-2006
    Location
    UK
    MS-Off Ver
    2013
    Posts
    204

    Running average formula (in same cell)

    I need a formula that will show the average of a series of data:

    In column E, a series of data is entered one at a time (E9:E13) which is calculated from the value of other cells.

    E14 is to show the average of data entered between E9:E13. But it needs to show the average only for total number of figures entered (so if E9:E11 has been entered, E14 will show the average of E9:E11, similarly if E9:E12 has been entered, then B1 will show the average of E9:E12).

    The default value of cells in row E is 0 which may complicate matters, as 0 is a valid entry.

    I know I could have several cells for each average, but that is not what is needed, nor do I want to have to manually change the range that E14 refers to.

    Can anyone help? I've attached the spreadsheet if it helps.
    Attached Files Attached Files
    Last edited by wonderdunder; 02-27-2011 at 12:28 PM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: Running average formula (in same cell)

    AVERAGE formula don't include blank cells so you just put =AVERAGE(A1:A7)

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Running average formula (in same cell)

    Does the AVERAGE Function not work?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Contributor
    Join Date
    02-08-2006
    Location
    UK
    MS-Off Ver
    2013
    Posts
    204

    Re: Running average formula (in same cell)

    My apologies - I've made few changes since you have posted.

    I was told that the average function would average cells with 0, which is a number that could be entered, but is also currently the default value?

    I'll give it a try and see what happens.

  5. #5
    Forum Contributor
    Join Date
    02-08-2006
    Location
    UK
    MS-Off Ver
    2013
    Posts
    204

    Re: Running average formula (in same cell)

    I see! It will average 0 but not blank.

    I'll carry on with some re-jigging.

    Thanks for the replies.

  6. #6
    Forum Contributor
    Join Date
    02-08-2006
    Location
    UK
    MS-Off Ver
    2013
    Posts
    204

    Re: Running average formula (in same cell)

    Erm.... This is getting complicated!

    For this to work, I'm going to have to set almost every cell to an if statement to set it to blank if no data is entered, or can anyone think of a better solution (bearing in mind that I don't want to change the range manually or have several different cells showing all the averages)?

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: Running average formula (in same cell)

    Can you upload example?

  8. #8
    Forum Contributor
    Join Date
    02-08-2006
    Location
    UK
    MS-Off Ver
    2013
    Posts
    204

    Re: Running average formula (in same cell)

    It's attached on my first post.

  9. #9
    Forum Contributor
    Join Date
    02-08-2006
    Location
    UK
    MS-Off Ver
    2013
    Posts
    204

    Re: Running average formula (in same cell)

    Think I've cracked it - I think. Have attached the sheet with the revisions.

    Basically, I've just put IF statements in so that cells containing formulas are blank if the cells in B are blank.

    If anyone wouldn't mind just having a wizz through it to confirm.....
    Attached Files Attached Files

+ 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