+ Reply to Thread
Results 1 to 5 of 5

Shift range of cells to calculate formula by fixed number

  1. #1
    Registered User
    Join Date
    03-10-2009
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Thumbs up Shift range of cells to calculate formula by fixed number

    How can I shift the range of cells I want to calculate an average from?

    For example I want to get the average of cells A1 to A10, so =AVERAGE(A1:A10)

    And next I want to get the average of cells A11 to A20, so
    =AVERAGE(A11:A20)

    But I don't want to manually change the data or delete rows all the time.

    Is it possible to do something like:
    =average(A1+10:A10+10) ??

    Thanks a lot.
    Last edited by prody; 03-10-2009 at 11:47 PM. Reason: Wrong number, grammar

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Shift range of cells to calculate formula by fixed number

    Well, there are tricks you can use referring to ROWS and or COLUMNS. Tell me what cell holds your first formula and then what cell will hold the next one and we can show you some methods to adjust range values as you copy the cell from one place to another.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    03-10-2009
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Shift range of cells to calculate formula by fixed number

    B1: =average(A1:A10)
    B2: =average(A11:A20)

    Thx

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Shift range of cells to calculate formula by fixed number

    Put this formula in B1 and copy down:

    =AVERAGE(INDIRECT("A"&ROW()*10-9&":A"&ROW()*10))

  5. #5
    Registered User
    Join Date
    03-10-2009
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Shift range of cells to calculate formula by fixed number

    Quote Originally Posted by JBeaucaire View Post
    Put this formula in B1 and copy down:

    =AVERAGE(INDIRECT("A"&ROW()*10-9&":A"&ROW()*10))
    Thanks a lot JBeaucaire, I understand how it works. Never heard of this indirect before.

+ 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