+ Reply to Thread
Results 1 to 3 of 3

Fill-down for the AVERAGE function, problem

  1. #1
    Registered User
    Join Date
    04-25-2009
    Location
    Sydney
    MS-Off Ver
    Excel 2003
    Posts
    2

    Fill-down for the AVERAGE function, problem

    Hi!

    This is my first post, here goes...

    I am trying to create a table showing the yearly average occupancy rates per quarter for every year between may 1998 and december 2008 inclusive (for licensed hotels, motels and guest houses, and serviced apartments in Australia; if that interests you).

    I have a spreadsheet with a row of data showing the appropriate quarterly results for those dates. Let's say the data for this is displayed A1 through to A44.

    For the yearly per quarter averages, let's say they are to go from B1 through to B11, I know I could put, for each year, an average formula with the relevant data range. Finding this to be tedious, I tried to fill-down.

    I learnt the hard way however (not being too aware of how excel's grammar ticks) that the fill down function will not work for me. i.e., if B1 contained the average for the data range A1:A4 (the four quarters of 1998), the filled-in B2 would have the data range A2:A5 (i.e. the 2nd quarter of 1998 through to the 3rd quarter of 1999).

    The actual question I am working on bores me, but finding a way around this is pretty interesting. I've been looking about and asking friends (you know, those self-titled 'computer-savvy'-type friends...pfft) for hours now. I could've easily done the work cell-by-cell I guess. I could've really slogged it out and finished it by now...

    But that's of minimal consequence.

    I'm sure there's an answer and it's just pains me to let it slip by. Maybe it's so simple that there are those who would read this and just chortle to themselves, shaking their heads and rolling their eyes. Clucking their tongues even. I don't know what people do in these situations.

    Anyway, in short, how would it be possible to make a formula that can be filled-down with the data range beginning after the previous one ended, and so forth?

    Please, sorry and thank you so very much... just for reading, even.

    Cheers.
    Last edited by Voctron; 04-25-2009 at 11:28 AM. Reason: Solved!

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

    Re: Fill-down for the AVERAGE function, problem

    If I've understood and you're saying

    B1: =Average(A1:A4)
    B2: =Average(A5:A8) etc

    Then to do this programatically (ie adjust the range as the formula is copied down row by row)

    B1: =AVERAGE(INDEX($A$1:$A$44,1+(4*(ROWS(B$1:B1)-1))):INDEX($A$1:$A$44,4*(ROWS(B$1:B1))))
    copied down to B11

    Using OFFSET approach which is Volatile (ie generally best avoided if using lots and lots of them...):

    B1: =AVERAGE(OFFSET($A$1,4*(ROWS(B$1:B1)-1),,4,1))
    copied down to B11

  3. #3
    Registered User
    Join Date
    04-25-2009
    Location
    Sydney
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Fill-down for the AVERAGE function, problem

    Mate!

    Thank you so much. I appreciate the effort - and am really happy to get some closure.

    Cheers,
    victor

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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