+ Reply to Thread
Results 1 to 9 of 9

how to combine a single period return formula & a multiple period formula?

  1. #1
    Registered User
    Join Date
    04-25-2013
    Location
    Philly
    MS-Off Ver
    Excel 2010
    Posts
    26

    how to combine a single period return formula & a multiple period formula?

    in my worksheet column A has period #, B values with over 500 rows. In column c I want to calculate the 5 period ave in a single concise formula and drag it down the column.

    A B
    1 12
    2 18
    3 20
    4 17
    5 17.5
    6 18.3
    down to
    ...
    500 16

    I am hoping to shorten what I am currently using because it will be nested inside another formula, to reduce the number of columns needed to get my desired end result.

    =(LN(B10/B9)+LN(B11/B10)+LN(B12/B11)+LN(B13/B12)+LN(B14/B13))/5

    Thanks in advance

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: how to combine a single period return formula & a multiple period formula?

    hi uptickdk,

    welcome to the forum.
    You need 5 period average but in formula you are adding B9 to B14 and cells count comes to 6.. why ? Also, you are adding a cell twice e.g, B10 if you see your formula.. can you explain this ? Thanks.




    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    04-25-2013
    Location
    Philly
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: how to combine a single period return formula & a multiple period formula?

    DILIPandey- I guess I wasn't as clear as I wanted to be, it was late at night when I sent it.

    my goal is to combine 2 formulas into one so I can nest them into another formula without needed an additional columns.
    formula 1 is to find the return for each period using LN(period 2/period 1) to get the return for period 2, period 1 is just the starting point. formula 2 is an average of these returns. my example above is for 5 periods, the 5 period returns/5.

    Additional: I would like to use a reference for the number of periods (N) and have the formula add the correct number of period returns and then divide by N. If this is possible it will make the other columns easier to create.
    thanks

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: how to combine a single period return formula & a multiple period formula?

    you query is not clear to me.. can you upload a sample workbook ? thanks.


    Regards,
    DILIPandey
    <click on below * if this helps>

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: how to combine a single period return formula & a multiple period formula?

    May be:
    C2=AVERAGE(B2:B6/B1:B5)
    Drag down
    Quang PT

  6. #6
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: how to combine a single period return formula & a multiple period formula?

    Your formula
    Please Login or Register  to view this content.
    Returns the exact same result as
    Please Login or Register  to view this content.
    Logarithm rule, ln(B10/B9) = ln(B10) - ln(B9)

    So, your formula is like
    ( ln(B10) - ln(B9) + ln(B11) - ln(B10) + ln(B12) - ln(B11) + ln(B13) - ln(B12) + ln(B14) - ln(B13) ) / 5
    And, after 5s of simplifying, you have
    ( ln(B14) - ln(B9) ) / 5 which is ln(B14/B9)/5
    Last edited by Lemice; 04-26-2013 at 05:07 AM.
    (copy pasta from Ford)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools

    Regards,
    Lem

  7. #7
    Registered User
    Join Date
    04-25-2013
    Location
    Philly
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: how to combine a single period return formula & a multiple period formula?

    Not sure why my replies aren't taking but this is my 3rd and last time writing this.

    First thanks Lem

    Next is to deal with the variability of a N period averages where the cells not used are blank. I will need to be able to drag this down a column.

    Example to calculate the average for 5 period returns N=5 (cell C10=5) in C13 is =IFERROR(LN((INDIRECT("b"&$C$10))/IF($C$10>5,"",B8))/$C$10,"")

    If we change the N=10 then in C18 it should read =IFERROR(LN((INDIRECT("b"&$C$10))/IF($C$10>5,"",B18))/$C$10,"") and C13,C14,C15,C16,C17 would all be blank.

  8. #8
    Registered User
    Join Date
    04-25-2013
    Location
    Philly
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: how to combine a single period return formula & a multiple period formula?

    Disregard my previous post I resolved it and posted an incorrect formula.

    Thanks again,
    Lem

  9. #9
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: how to combine a single period return formula & a multiple period formula?

    HI uptickdk,

    For benefit of others, please share what formula resolved your error. Also, please mark this thread as [SOLVED]. thanks


    Regards,
    DILIPandey
    <click on below * if this helps>

+ 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