+ Reply to Thread
Results 1 to 6 of 6

XIRR with Noncontiguous Cell Ranges Issue

  1. #1
    Registered User
    Join Date
    07-04-2022
    Location
    United States
    MS-Off Ver
    Office 365 v2205
    Posts
    3

    XIRR with Noncontiguous Cell Ranges Issue

    Hello,

    I've read a bunch of topics on how to tackle noncontiguous XIRR calculations (not allowed to post links yet)

    The solution essentially says to put another parentheses around the XIRR ranges and dates like so:

    Please Login or Register  to view this content.
    However, when I try this with my data, all I get is #VALUE (see attachment).

    My formula is as follows:

    Please Login or Register  to view this content.
    My cell types for dates is MM/DD/YYYY (works for contiguous). And my amounts is formatted as "general".

    Excel version is Office Professional Plus 2016.

    Any help would be very much appreciated!
    Attached Files Attached Files
    Last edited by AnExcelGuy; 07-04-2022 at 01:11 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    07-13-2021
    Location
    California, USA
    MS-Off Ver
    2010
    Posts
    513

    Re: XIRR with Noncontiguous Cell Ranges Issue

    Quote Originally Posted by AnExcelGuy View Post
    not allowed to post links yet
    You can work around that by spelling out the link to some degree. For example:

    www dot excelforum dot com /newreply.php?do=postreply&t=1381497

    -----

    Quote Originally Posted by AnExcelGuy View Post
    The solution essentially says to put another parentheses around the XIRR ranges and dates like so:
    [...]
    =XIRR((L39:L40,L42),(K39:K40,K42))
    That range-union syntax works with Excel IRR, but not with Excel XIRR -- at least in Excel 2010 and earlier, and apparently not yet in Excel 2016.

    (Perhaps MSFT "fixed" that in a recent build of Office 365 Excel and/or Excel 2019 and later.)

    The messy way to write that is:

    =XIRR(IF(ROW(L39:L41)=ROW(L41),L42,L39:L41), IF(ROW(K39:K41)=ROW(K41),K42,K39:K41))

    That must be array-entered (press ctrl+shift+Enter) in some versions of Excel.

    -----

    PS.... The above might be a useful paradigm for you. But in your example Excel file, you can simply write =XIRR(B2:B5,A2:A5). XIRR tolerates empty rows in the middle and end of the ranges. It is not tolerant of empty rows in the beginning of the ranges.
    Last edited by curiouscat408; 07-04-2022 at 03:14 PM.

  3. #3
    Registered User
    Join Date
    07-04-2022
    Location
    United States
    MS-Off Ver
    Office 365 v2205
    Posts
    3

    Re: XIRR with Noncontiguous Cell Ranges Issue

    Thank you so much for that clarification. I was hoping the solution would solve the real problem I was facing (I genericized it for the sake of simplicity).

    The real problem I'm facing is different in structure. In the attached, you'll notice for each date (there can be hundreds of dates), I'm trying to calculated XIRR. In order to do this, I need to pretend that all of the contributions have been given back on the same transaction date.

    For example, if I'm calculating the XIRR at transaction 5, the XIRR would need to be XIRR((C1:C5, D5),(B1:B5,B5)). That is, I'm taking the total contribution as the last contribution to round out the XIRR function (the same date as the final distribution (4/15)).

    I don't think your solution would work for this scenario.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    07-13-2021
    Location
    California, USA
    MS-Off Ver
    2010
    Posts
    513

    Re: XIRR with Noncontiguous Cell Ranges Issue

    Good luck with that. I won't be able to help you further.
    Last edited by curiouscat408; 07-04-2022 at 07:06 PM.

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: XIRR with Noncontiguous Cell Ranges Issue

    The version number you've posted as part of your profile isn't the most helpful, though it does suggest you have the latest Insider functions.

    =XIRR(VSTACK(C2:C5,D5),VSTACK(B2:B5,B5))

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  6. #6
    Registered User
    Join Date
    07-04-2022
    Location
    United States
    MS-Off Ver
    Office 365 v2205
    Posts
    3

    Re: XIRR with Noncontiguous Cell Ranges Issue

    Holy crap, that worked! Just a note to those reading this thread that VSTACK is currently only available in Office Insider Beta. Even if you have the most recent Office 365, this function is not yet productionized.

+ 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. SetSourceData with noncontiguous ranges
    By LewisBosworth in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 06-19-2019, 02:53 AM
  2. Xirr issue
    By cartica in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-11-2015, 03:31 PM
  3. Highlight noncontiguous ranges of cells
    By TrafficGuy in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-01-2011, 06:57 PM
  4. Printing noncontiguous ranges on 1 Page
    By JARLATH1000 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-12-2008, 10:42 AM
  5. Noncontiguous Dynamic Ranges
    By jasoncw in forum Excel General
    Replies: 1
    Last Post: 02-07-2007, 03:20 PM
  6. [SOLVED] Noncontiguous ranges printed on one page????
    By ajchula in forum Excel General
    Replies: 5
    Last Post: 10-24-2005, 07:05 PM
  7. [SOLVED] Noncontiguous Cells or Ranges in a Formula?
    By meverly9 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-30-2005, 08:05 PM

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