+ Reply to Thread
Results 1 to 4 of 4

applying formula repeatedly to blocks of cells

  1. #1
    Registered User
    Join Date
    08-14-2009
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    13

    applying formula repeatedly to blocks of cells

    How can I calculate averages of blocks of 200 cells? so the first output row shows average of first 200 cells, next output row from cell numbers 201-400, the next 401-600 and so on.


    = Average(A1:A200)
    = Average(A201:A400)
    = Average(A401:A600)
    etc.

    Sample file attached.
    Attached Files Attached Files

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: applying formula repeatedly to blocks of cells

    In B2, = AVERAGE(INDEX(A:A, 200*ROWS($A$1:A1) - 198):INDEX(A:A, 200*ROWS($A$1:A1) + 1))
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: applying formula repeatedly to blocks of cells

    shg used Row() as did I,

    I had to build my formula to make sure it was correct. See the attached for my slower answer.
    Attached Files Attached Files

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: applying formula repeatedly to blocks of cells

    =AVERAGE(OFFSET(INDEX(A:A,(ROW(A1)*200)-198),,,200)) only cos your example was rubbish! and i couldn't understand the results
    e.g.
    = AVERAGE(A202,401)
    should be
    = AVERAGE(A202:A401)
    Last edited by martindwilson; 08-30-2010 at 06:14 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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