+ Reply to Thread
Results 1 to 10 of 10

Calculating an average in a single cell

  1. #1
    Registered User
    Join Date
    06-11-2009
    Location
    Cardiff
    MS-Off Ver
    Excel 2003
    Posts
    20

    Calculating an average in a single cell

    Hey,

    I want to have one single cell that when i add figures to it, they automatically give me a running average.

    Like this thread, but instead of adding the numbers together it will add the numbers together and divide by how many times i have entered a number
    http://www.excelforum.com/excel-new-...that-cell.html

    Get me?

    Thanks

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Calculating an average in a single cell

    This cannot be done with a regular excel formula, and the link you posted used VBA for what the OP wanted. I will move this thread to the VBA forum, you will get better help there
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394

    Re: Calculating an average in a single cell

    This is a non trivial problem the way you have described it, much harder than the sum example you posted. The key issue is that you need to keep track of 2 sets of data. The current total (as per the sum example) but also the total number of numbers ever entered. What happens if you enter the number 2, 4 times. The average will be 2. So how will you know if it worked or not? What happens if think it didn't work, and you do it again. Now you have 5 times 2 and no way to undo what you did.

    Why do you want to do it this way? What is the actual problem you are trying to solve? Why can't you create a table that allows you to add new numbers to the table, have a running total and average. That way you can keep records of all the numbers you have entered in the past.

  4. #4
    Registered User
    Join Date
    06-11-2009
    Location
    Cardiff
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Calculating an average in a single cell

    the reason i want this is because of space.
    i have allot of data and i dont want extra cells cluttering up the spreadsheet and making it look confusing

  5. #5
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Calculating an average in a single cell

    hi martynmordecai, please check attachment, input numbers in C3 (numbers only allowed) to get running average
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    06-11-2009
    Location
    Cardiff
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Calculating an average in a single cell

    it dosen't seem to be doing anything

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Calculating an average in a single cell

    if you enter the following numbers in C3, for example: 1 then 2 then 3 then 4
    you will get C3 value: 1 then 1,5 then 2 then 2,5
    Do I get something wrong on your issue?

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Calculating an average in a single cell

    When I tried your file, it worked for me too, waterserv

  9. #9
    Registered User
    Join Date
    06-11-2009
    Location
    Cardiff
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Calculating an average in a single cell

    ive tried many times are it wont work for me. the number in cel c3 just stays the same

  10. #10
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Calculating an average in a single cell

    try to run the following first:

    Please Login or Register  to view this content.
    and then try to input numbers in C3

+ 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