XIRR and Non Contiguous Values

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Hi
Welcome to the board

I guess you mean:

Code:
Function ArrayUnion(ParamArray Arg() As Variant) As Variant
     ' Code: Juan Pablo González
     ' Spec: Aladin Akyurek
     ' May 4, 2003
     ' Ref: [url=http://makeashorterlink.com/?P20022174]TinyURL.com - shorten that long URL into a tiny URL[/url]
     Dim TempUnion() As Variant
     Dim i As Long, Itm As Variant, Ctr As Long

     For i = LBound(Arg) To UBound(Arg)
         Arg(i) = Arg(i)
         If IsArray(Arg(i)) Then
             For Each Itm In Arg(i)
                 Ctr = Ctr + 1
                 ReDim Preserve TempUnion(1 To Ctr) As Variant
                 TempUnion(Ctr) = Itm
             Next Itm
         Else
             Ctr = Ctr + 1
             ReDim Preserve TempUnion(1 To Ctr) As Variant
             TempUnion(Ctr) = Arg(i)
         End If
     Next i
     ArrayUnion = TempUnion
 End Function

But if you had explained your problem, sometimes you can solve this type of problems without vba.
 
Upvote 0
I'm Looking forward to XIRR((F2:F121, G122), A2:A122) Note G122 Contains the Negative Value. I can't move F2:F121 to G2:G121. So how can I do this without Macro? Using Excel 2007.
 
Upvote 0
Hi

Try:

=XIRR(IF(ROW(2:122)<=121,F2:F121,G122), A2:A122)

This in an array formula and so MUST be confirmed with CTRL+SHIFT+ENTER and not just ENTER.

I'm leaving now but I'll check this thread tomorrow.
 
Upvote 0
This works well for that given cell. However, when I DRAG to find the next XIRR the values are incorrect. I have uploaded the spreadsheet here http://www.exaleads.com/test.xls Can you please look ?

Thanks

No. I cannot get external files.

If you want to post a table with values usually works:

- in your personal settings, set the Editor option: Enhanced Interface - Full WYSIWYG Editing
- select a table in excel and paste it directly in the IE when you answer the post

Remark: it will be easier to read if before copying the table you add borders to it.

In this case a table with 10-15 lines should be enough. Post the input, the expected output, the logic and what you tried

Ex., copyind directly from excel to the IE:


a2
d3
f5

<COLGROUP><COL style="WIDTH: 48pt" span=2 width=64><TBODY>
</TBODY>
 
Upvote 0
1. Data Set runs from 01-01-1997 till DEC-2012 with Fixed Monthly Inflow of $1000. For $1000, depending on the Value I allot some Units in the Fund every month
2. The Cumulative allotted units month over month are redeemed after a 10 year period, rolling on a month to month basis in the example below 1049489 is obtained by 7125.518 * 147.286
3. I am calculating XIRR for the same.
4. The negative value cannot be in the column of $1000s so I added a separate column which is where the problem comes.

Columns as Under

Date, Value of Unit, No of Units Allotted, Cumulative Total, Value(B*D), Monthly Inflow, Negative Value, XIRR
1-Sep-0585.99211.6296996.6046016521000
3-Oct-0594.32410.6027007.206660947.71000
2-Nov-0589.32911.1957018.401626946.71000
1-Dec-05100.9459.9067028.307709472.51000
2-Jan-06107.1889.3297037.636754350.11000
1-Feb-06112.4838.897046.526792614.41000
1-Mar-06119.4958.3697054.895843024.71000
3-Apr-06130.8197.6447062.539923914.31000
2-May-06134.0537.467069.999947754.61000
1-Jun-06112.3278.9037078.902795151.81000
3-Jul-06114.598.7277087.629812171.41000
1-Aug-06115.6488.6477096.276820670.11000
1-Sep-06128.0637.8097104.085909770.41000
3-Oct-06132.6347.547111.625943243.31000
1-Nov-06140.1917.1337118.758997985.81000
1-Dec-06147.9376.767125.51810541281000
2-Jan-07147.2866.797132.30810504891000-104948940.6776184
1-Feb-07152.4156.5617138.86910880711000-108707155.0440711
1-Mar-07143.6766.967145.82910266841000-1025684
2-Apr-07136.7477.3137153.142978170.71000-977171
3-May-07153.1696.5297159.67110966401000-1095640
1-Jun-07161.9036.1777165.84811601721000-1159172
2-Jul-07166.6476.0017171.84911951671000-1194167

<tbody>
</tbody>
 
Upvote 0
Good. So if I undderstand correctly you want to calculate the values 40.6776184 and 55.0440711? Can you post the range inputs for both cases in the XIRR() formula?
 
Upvote 0
I am only posting Relevant Columns Required for XIRR
1-Jan-975.67176.3671000
3-Feb-975.56356.2231000
1-Mar-976.09520.4271000
2-Apr-975.88690.4951000
2-May-975.96858.281000
2-Jun-975.961026.0651000
1-Jul-976.661176.2151000
1-Aug-977.431310.8051000
1-Sep-976.871456.3651000
1-Oct-976.921600.8741000
5-Nov-976.681750.5751000
1-Dec-976.621901.6321000
1-Jan-986.792048.9071000
2-Feb-986.442204.1871000
2-Mar-987.022346.6371000
1-Apr-987.652477.3561000
4-May-988.672592.6961000
1-Jun-988.592709.111000
1-Jul-987.182848.3861000
3-Aug-987.42983.5211000
1-Sep-987.463117.5691000
5-Oct-987.63249.1481000
2-Nov-987.953374.9341000
1-Dec-988.253496.1461000
1-Jan-999.293603.7891000
1-Feb-9910.233701.5411000
1-Mar-9911.643787.4521000
5-Apr-9912.093870.1651000
3-May-9911.143959.9321000
1-Jun-9912.684038.7961000
1-Jul-9913.094115.191000
2-Aug-9915.34180.5491000
1-Sep-9917.364238.1531000
4-Oct-9918.434292.4121000
1-Nov-9918.114347.631000
1-Dec-9921.034395.1811000
3-Jan-0024.914435.3261000
1-Feb-0025.574474.4341000
1-Mar-0027.744510.4831000
3-Apr-0024.134551.9251000
2-May-0020.784600.0481000
1-Jun-0019.974650.1231000
3-Jul-0022.394694.7861000
1-Aug-0018.694748.2911000
4-Sep-0021.274795.3061000
3-Oct-0018.964848.0491000
1-Nov-0018.574901.8991000
1-Dec-0018.934954.7251000
1-Jan-0118.85007.9161000
1-Feb-0119.675058.7551000
1-Mar-0119.665109.621000
2-Apr-0116.165171.5011000
2-May-0117.345229.1711000
1-Jun-0117.895285.0681000
2-Jul-0116.995343.9261000
1-Aug-0116.145405.8841000
3-Sep-0115.955468.581000
1-Oct-0114.695536.6541000
1-Nov-0116.735596.4271000
3-Dec-0118.175651.4631000
1-Jan-0218.25706.4081000
1-Feb-0219.645757.3241000
1-Mar-0221.925802.9441000
1-Apr-0222.595847.2111000
2-May-0222.945890.8031000
3-Jun-0221.535937.251000
1-Jul-0222.315982.0731000
1-Aug-0220.866030.0121000
2-Sep-0221.636076.2441000
1-Oct-0219.826126.6981000
1-Nov-0220.086176.4991000
2-Dec-0221.446223.1411000
1-Jan-0322.96266.8091000
3-Feb-0322.876310.5341000
3-Mar-0323.376353.3241000
1-Apr-0322.396397.9871000
2-May-0323.936439.7761000
2-Jun-0326.246477.8861000
1-Jul-0329.7956511.4491000
1-Aug-0332.0416542.6591000
1-Sep-0337.5396569.2981000
1-Oct-0338.9836594.951000
3-Nov-0344.7416617.3011000
1-Dec-0346.7746638.681000
1-Jan-0452.2866657.8061000
3-Feb-0449.5826677.9751000
1-Mar-0452.936696.8681000
1-Apr-0453.2946715.6321000
3-May-0453.2586734.4091000
1-Jun-0446.0456756.1271000
1-Jul-0446.3186777.7171000
2-Aug-0449.3966797.9621000
1-Sep-0451.9026817.2291000
1-Oct-0455.5986835.2151000
1-Nov-0455.3386853.2861000
1-Dec-0460.3566869.8541000
3-Jan-0566.3876884.9171000
1-Feb-0563.9516900.5541000
1-Mar-0567.7616915.3121000
1-Apr-0568.246929.9661000
2-May-0565.4846945.2371000
1-Jun-0571.786959.1681000
1-Jul-0574.3386972.621000
1-Aug-0580.946984.9751000
1-Sep-0585.9926996.6041000
3-Oct-0594.3247007.2061000
2-Nov-0589.3297018.4011000
1-Dec-05100.9457028.3071000
2-Jan-06107.1887037.6361000
1-Feb-06112.4837046.5261000
1-Mar-06119.4957054.8951000
3-Apr-06130.8197062.5391000
2-May-06134.0537069.9991000
1-Jun-06112.3277078.9021000
3-Jul-06114.597087.6291000
1-Aug-06115.6487096.2761000
1-Sep-06128.0637104.0851000
3-Oct-06132.6347111.6251000
1-Nov-06140.1917118.7581000
1-Dec-06147.9377125.5181000
2-Jan-07147.2867132.3081000-1049489
1-Feb-07152.4157138.8691000-1087071

<tbody>
</tbody>

On 2nd Jan XIRR(IF(ROW(1:121)<=121,D1:D120,E121), A1:A121)*100 so on...
 
Upvote 0
Try in F121:

=XIRR(IF(ROW($1:121)<ROW(),$D$1:D120,E121), $A$1:A121)*100

... confirmed with CSE

Copy down
 
Upvote 0

Forum statistics

Threads
1,216,059
Messages
6,128,542
Members
449,457
Latest member
ncguzzo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top