I have the following numbers/dates in an excel sheet A1:D3
1/1/2007 1/1/2008 1/1/2009 1/1/2010
$ (10) $ 1
$ 2 $ 20
I want to run an XIRR on the entire stream, something to the effect of XIRR(A2:B2&C3:D3,A1:D1)
This will not work. I could create a 4th row that sums rows 2 and 3 and do XIRR(A4:D4,A1:D1) but I have literally 1000 of these and for reasons too long to explain here, do not want to/can not do that way.
Any way to run on XIRR on A1:D3 without creating a new summed row?
Thanks

Signature
CARMEN HOVENDICK
joeu2004@hotmail.com - 09 Dec 2006 04:36 GMT
> I have the following numbers/dates in an excel sheet A1:D3
> 1/1/2007 1/1/2008 1/1/2009 1/1/2010
[quoted text clipped - 3 lines]
> [....]
> Any way to run on XIRR on A1:D3 without creating a new summed row?
If all of your cash flows are in a contiguous range ordered in time
left-to-right top-to-bottom, as in your example, perhaps you could do
something like:
=xirr(A2:C3, A1:D1)
The dates could also be in a rectangular range as long as their order
corresponds to the cash flows left-to-right top-to-bottom.
PS: I wonder if you truly need, or even want, XIRR instead of IRR. Do
you want all the years' cash flows to be considered equally spaced
(which IRR assumes), or do you truly want to differentitate between
365-day and 366-day years (which XIRR will do)?
Carmen - 11 Dec 2006 18:00 GMT
Joe, thanks for the reply, but I guess I made my example too simple relative
to the real problem. The cash flows in my real file are not on adjacent
lines, they are on lines separated by up to 20 lines, all with data on them
so your solution would not work. Also, the dates are random, not all at
first of years as I made the example so I do need XIRR.
Any other thoughts?

Signature
CARMEN HOVENDICK
>> I have the following numbers/dates in an excel sheet A1:D3
>> 1/1/2007 1/1/2008 1/1/2009 1/1/2010
[quoted text clipped - 18 lines]
> (which IRR assumes), or do you truly want to differentitate between
> 365-day and 366-day years (which XIRR will do)?
Ron Rosenfeld - 11 Dec 2006 18:27 GMT
>I have the following numbers/dates in an excel sheet A1:D3
>
[quoted text clipped - 9 lines]
>
>Thanks
I'm not sure exactly what you mean, but XIRR requires that the dates be in a
contiguous range; and that the values be in a contiguous range. (The values
don't need to be next to the dates, however).
It is also a requirement that there be one date for each value (and one value
for each date).
So you need to set up an area on your worksheet where you have a layout that
meets those requirements.
Alternatively, you could NAME the non-contiguous range of dates; and the range
of values, and use this VBA user defined function supplied by Harlan Grove:
==========================================
Option Explicit
Function myxirr( _
v As Variant, _
d As Variant, _
Optional g As Double = 0 _
) As Variant
'-------------------------------------------------------
'this udf requires an explicit reference to APTVBAEN.XLA
'if v and/or d represent non-contiguous ranges, they should be NAME'd
'-------------------------------------------------------
Dim vv As Variant, dd As Variant, X As Variant, i As Long
If TypeOf v Is Range Then
ReDim vv(1 To v.Cells.Count)
i = 0
For Each X In v
i = i + 1
vv(i) = X.Value
Next X
Else
vv = v
End If
If TypeOf d Is Range Then
ReDim dd(1 To d.Cells.Count)
i = 0
For Each X In d
i = i + 1
dd(i) = X.Value
Next X
Else
dd = d
End If
myxirr = IIf(g <> 0, xirr(vv, dd, g), xirr(vv, dd))
End Function
=========================================
--ron
Carmen - 13 Dec 2006 19:32 GMT
Ron, thanks for Harlen's solution, but it is way over my head and the people
I would be sending the file to (to understand).

Signature
CARMEN HOVENDICK
>
>>I have the following numbers/dates in an excel sheet A1:D3
[quoted text clipped - 73 lines]
> =========================================
> --ron
Ron Rosenfeld - 13 Dec 2006 19:44 GMT
>Ron, thanks for Harlen's solution, but it is way over my head and the people
>I would be sending the file to (to understand).
Then you will have to set up a section where you have the data in a format that
XIRR can use.
Best,
--ron