+ Reply to Thread
Results 1 to 5 of 5

[BEGINNER] How to make the formula jump cells when expanding?

  1. #1
    Registered User
    Join Date
    12-05-2014
    Location
    Oslo, Norway
    MS-Off Ver
    Windows 8.1
    Posts
    3

    [BEGINNER] How to make the formula jump cells when expanding?

    Hi,

    I want to compare two statistical samples. However one is given in yearly and the second one is given quarterly.
    I calculated the average of the first year with =AVERAGE(F5:I5) but when I expand I will calculate =AVERAGE(G5:J5). Is there any way to have it jump to =AVERAGE(J5:M5) when expanding? There are a lot of data and entering the formula manually would be quite inefficient.

    Cheers,
    August

  2. #2
    Registered User
    Join Date
    09-02-2009
    Location
    Amsterdam
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: [BEGINNER] How to make the formula jump cells when expanding?

    Can you upload a workbook example that demonstrates your problem?

  3. #3
    Registered User
    Join Date
    12-05-2014
    Location
    Oslo, Norway
    MS-Off Ver
    Windows 8.1
    Posts
    3

    Re: [BEGINNER] How to make the formula jump cells when expanding?

    Thanks for the reply.

    I have sampled some of the data in the attachment.
    As you can see I want to make a new series of the yearly average. The original data contains about 40 years and I simply want to drag the expansion cross after entering one function. I considered using sumproduct and adding LEFT("respective year";4) as a criteria, but I am not sure on how to use it correctly.

    [ATTACH]363109[/ATTACH
    Attached Files Attached Files
    Last edited by Aughar; 12-05-2014 at 10:26 AM.

  4. #4
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: [BEGINNER] How to make the formula jump cells when expanding?

    Try using this OFFSET function

    Put this formula in cell B6, and copy across to C6, D6, and so on.

    =AVERAGE(OFFSET($E$2:$H$2,0,(COLUMNS($B$5:B5)*4)-4))

    It works by offsetting the array E2:H2 by a number of cells. The number of cells is generated by the COLUMNS() function, which will return a 1 in the first cell, then a 2, then a 3 and so on, as you copy the formula to the right

    It it multiplied by 4, because we want to offset by 4 cells each time. so the first cell will actually have OFFSET(E2:H2,1*4), so it will offset the area to the right by by 4 cells. The second one will be OFFSET(E2:H2,2*4), which will offset the area by 8 cells, and so on.

    I have a -4 in there because i want the first cells offset to be 0. then 4, then 8, as you copy, since the first cell will have COLUMNS() = 1, then *4 = 4, and i don't want to OFFSET until the formula is copied left, so i take that initial 4 away.

    Hope that makes sense.


    As a side note, the data would be significantly easier to read if it is possible to transpose it, so the data set is Vertical instead of Horizontal. You can easily do this by selecting all of the data and copying it, select the location you want to paste to, then right click and go to Paste Special, and use "Transpose"
    Last edited by Speshul; 12-05-2014 at 04:06 PM.
    You should hit F5, because chances are I've edited this post at least 5 times.
    Example of Array Formulas
    Quote Originally Posted by Jacc View Post
    Sorry, your description makes no sense. I just made some formula that looks interesting cause I had nothing else to do.
    Click the * below on any post that helped you.

  5. #5
    Registered User
    Join Date
    12-05-2014
    Location
    Oslo, Norway
    MS-Off Ver
    Windows 8.1
    Posts
    3

    Re: [BEGINNER] How to make the formula jump cells when expanding?

    Thank you for your reply.
    It worked perfectly and made sense.

    Cheers,
    August

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to make a self expanding table?
    By Imbly in forum Excel General
    Replies: 6
    Last Post: 06-20-2014, 04:58 AM
  2. [SOLVED] making all referenced cells 'jump' X number of rows when I drag down a formula
    By ryefield in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-10-2013, 12:31 PM
  3. Replies: 3
    Last Post: 06-14-2010, 08:22 PM
  4. How to make cursor jump a column / a row
    By ukdodger in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-03-2006, 10:19 AM
  5. How to make Hyperlink jump accordingly
    By crapit in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-03-2005, 12:05 AM

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