+ Reply to Thread
Results 1 to 6 of 6

Averaging Last 32 entries in a column

  1. #1
    Registered User
    Join Date
    03-10-2008
    Posts
    2

    Averaging Last 32 entries in a column

    Wonder if anyone can help - I want to average the last 32 entries in a column but I also want add entries at the bottom and let the formula update.

    Cheers in anticipation
    ATB

    Can I do this at the bottom of the same column?
    Last edited by atbell99; 03-11-2008 at 02:26 AM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    Best bet is to used Assigned names.

    Let's say your data is from B3 onward with nothing a header in B2 and nothing in B1 (need to know this to subtract it out later )

    Under Define names, define Last32
    Please Login or Register  to view this content.
    Then Add, OK.
    In C1 (anywhere but B1)
    Please Login or Register  to view this content.
    This will only work if you don't have blanks however. Can you work with that?

    ChemistB

  3. #3
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    If you do have nulls (blank cells) in your list, you might take a look at this post: http://www.mrexcel.com/forum/showthread.php?t=308177

    You could adjust the formula ranges to suit your needs. To get the last 32, change the "-10" to "-32" and the "-9" to "-31". Fill the formula down more rows than are needed, so it will automatically include new entries (will show blank if nothing is in the first column).

  4. #4
    Registered User
    Join Date
    03-10-2008
    Posts
    2
    Quote Originally Posted by ChemistB
    Best bet is to used Assigned names.

    Let's say your data is from B3 onward with nothing a header in B2 and nothing in B1 (need to know this to subtract it out later )

    Under Define names, define Last32
    Please Login or Register  to view this content.
    Then Add, OK.
    In C1 (anywhere but B1)
    Please Login or Register  to view this content.
    This will only work if you don't have blanks however. Can you work with that?

    ChemistB
    I need to place the info in the same column at the bottom and also need to use the same formula for adjacent columns

  5. #5
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764
    Hi
    If you use same column to place the average, it becomes a circular reference in a formula. A macro can help you. try pasting the following codes in the macro window (Alt f11)

    Please Login or Register  to view this content.
    run the macro. It will find the average of last 32 entries of each column and positions it in the cell after last one.
    Ravi

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    I need to place the info in the same column at the bottom
    First question, if you are constantly adding rows of data, how do you know where the bottom is? In cases like that, I try to put my averages at the top of the column but will still work either way. You need to modify the formula appropriately, eg.
    Please Login or Register  to view this content.
    and also need to use the same formula for adjacent columns
    Naming additional columns are easier, you use the name for column B and modify it. For example, for column C name NColC defined as
    Please Login or Register  to view this content.
    This offsets the cells you had in column B by 1 column.

    ChemistB

+ 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