+ Reply to Thread
Results 1 to 7 of 7

Use index function to shift range in a patterned formula

  1. #1
    Registered User
    Join Date
    10-25-2010
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2007
    Posts
    21

    Question Use index function to shift range in a patterned formula

    Hi all,

    I have been playing around with a function all day and it is driving me nuts.

    My goal is to automatically calculate the volatility of a warrant's (equity) price over time as it approaches the end of its term (in this case 60 months).

    I want to create a formula that takes the STDEV of the Compounded Rate of Return and multiply that by the square root of the period (12 months). But I want to automate it somewhat by allowing me to copy the formula to other cells over time.

    PROBLEM: For each new time period that I add, I need to subtract two periods off the backend of the calculation. So, the range essentially shifts down two, but increases by one as well at the bottom.

    Example: See Attached Workbook
    Range I11:I79 contains Rate of Return percentages over time
    I want to calculate volatility as STDEV(PERIOD)*SQRT(12) every month until the warrant expires in 60 months.
    In my example, you can see I have tried to use the following formula with some success in cell N72:
    =STDEV(INDEX(_RR,COLUMNS(N72:$O72)):INDEX(_RR,COLUMNS(N72:$O72)+59))*SQRT(12)
    where _RR is a dynamic named range referring to:
    =OFFSET(Volatility!$I$13,0,0,COUNTA(Volatility!$I13:I80),1)

    I need to be able to copy and paste this function (and have it automatically fill in the correct formula) in cells N12:N79. I also need to be able to add new entries to the end.

    Thanks!

    Any help is much appreciated.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Use index function to shift range in a patterned formula

    Your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser)to the cross-post. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us help you!

    Read this to understand why we ask you to do this
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    10-25-2010
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Use index function to shift range in a patterned formula

    Sorry about that Ron.
    I should have looked closer at the rules.
    Should I remove the posting from Mr. Excel?
    Cheers
    Nick

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Use index function to shift range in a patterned formula

    Quote Originally Posted by ndube50 View Post
    Sorry about that Ron.
    I should have looked closer at the rules.
    Should I remove the posting from Mr. Excel?
    Cheers
    Nick
    Please just post the link from that site in your post here.
    That way we can easily click that link to check the progress at the other forum.

  5. #5
    Registered User
    Join Date
    10-25-2010
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Use index function to shift range in a patterned formula

    Quote Originally Posted by Ron Coderre View Post
    Please just post the link from that site in your post here.
    That way we can easily click that link to check the progress at the other forum.
    http://www.mrexcel.com/forum/showthr...20#post2776520

    Here is the link for the posting at Mr Excel

  6. #6
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Use index function to shift range in a patterned formula

    I *think* I understand what you're hoping to achieve.

    Using your posted workbook:
    This regular formula increments the referenced range by 2 cells for each 1 cell that you copy the formula down Col_N, always referencing 60 cells.
    Please Login or Register  to view this content.


    Copy that formula down as far as you need.

    Is that something you can work with?

  7. #7
    Registered User
    Join Date
    10-25-2010
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Use index function to shift range in a patterned formula

    Quote Originally Posted by Ron Coderre View Post
    I *think* I understand what you're hoping to achieve.

    Using your posted workbook:
    This regular formula increments the referenced range by 2 cells for each 1 cell that you copy the formula down Col_N, always referencing 60 cells.
    Please Login or Register  to view this content.


    Copy that formula down as far as you need.

    Is that something you can work with?
    Hi Ron,

    To be honest, I'm still having some difficulties with it.
    Perhaps my dynamic named range (_RR) is referencing the wrong cell?
    The value in cell N72 should equal the value in K72 (volatility). I then want to be able to drag the cell and have it automatically populate the cells correctly using the correct formula which increments the referenced range by 2 cells for each 1 that I copy down.

    Does that make sense?

    Thanks again for your help with this one.

    nick.

+ 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