+ Reply to Thread
Results 1 to 3 of 3

How do I get a function to use a discontiguous set of range data in XIRR?

  1. #1
    Registered User
    Join Date
    01-16-2013
    Location
    Brisbane, Australia
    MS-Off Ver
    2010
    Posts
    2

    How do I get a function to use a discontiguous set of range data in XIRR?

    Hi Everyone,

    So I'm trying to develop a function that will return the internal rate of return for a discontinuous set of data. Basically I want to use the function XIRR() with a filtered range of data plus a custom value at the front and back. What this function uses will vary with the input dates, and since i want to use this function for a range of dates it's just not possible for me to create a "holding sheet" that contains selectable data that the functions can access.

    Conversely, if I create a subroutine that does it then I can't just use it as a function, and since I can't use a function to create a worksheet, put data into it, work with it, then delete the sheet I can't use that either. Nor can I just use arrays because excel's XIRR function takes ranges as inputs. And I sure as hell don't want to write my own XIRR function from scratch.

    So I'm stuck; how do I get around this?

    Thanks for the help

  2. #2
    Registered User
    Join Date
    01-16-2013
    Location
    Brisbane, Australia
    MS-Off Ver
    2010
    Posts
    2

    Re: How do I get a function to use a discontiguous set of range data in XIRR?

    Ok I just discovered that I can in fact just pass arrays to functions instead of ranges. So now I built the array from within the function, then passed it on to the XIRR function and receive a credible result.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: How do I get a function to use a discontiguous set of range data in XIRR?

    Hi and welcome to the forum

    Its always great when you figure out your problems for yourself, and thanks for sharing the solution with us - Im sure other members will benefit from it

    Please take a moment to mark your thread as SOLVED by using the Thread Tools (located above your first post) and choose "Mark this thread as solved".
    Thanks.
    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
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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