+ Reply to Thread
Results 1 to 4 of 4

Working the average

  1. #1
    Registered User
    Join Date
    06-14-2005
    Location
    London
    MS-Off Ver
    2016
    Posts
    91

    Working the average

    I have a table which will expand over time. The end column of the table is an average field which averages the last four weeks data.

    The issue I have is that I manually have to amend the 4 columns it looks at each week (as a new one is added). What I would like to be able to do, either automatically or via a macro, is for the sheet to check each cell and if it is empty then ignore it and go through it until it has 4 occurrences i.e.

    A B C D E F G
    12 14 12 10 120

    So column G would be the average of A to D. It would check F and see that is blank, likewise with E and then it would check D, then C etc until it has 4 cells with data.

    Is that possible?, Does it make sense
    Last edited by Pjcan1; 11-30-2009 at 10:11 AM. Reason: title problem

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

    Re: Working the average

    To be on the safe side perhaps:

    Please Login or Register  to view this content.
    If the data is always contiguous then non-array

    Please Login or Register  to view this content.
    (you could also consider using OFFSET but it would be volatile)

    If there is a rule to how you're inserting columns you simplify further (ie potentially avoid use of INDEX)
    Last edited by DonkeyOte; 11-30-2009 at 10:17 AM.

  3. #3
    Registered User
    Join Date
    06-14-2005
    Location
    London
    MS-Off Ver
    2016
    Posts
    91

    Re: Working the average

    It doesn't work but that could be for many reasons, could you just step me through what each part of the formula is doing

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

    Re: Working the average

    it would help if you perhaps outlined which of the outlined approaches you adopted ?
    ie are the completed data points contiguous or not ?

    EDIT: also specify (rough) geo location and XL version in use
    Last edited by DonkeyOte; 11-30-2009 at 10:37 AM.

+ 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