XIRR on selected lines

susselyd

New Member
Joined
Feb 15, 2003
Messages
13
Hello,

I have used the function below to get the IRR on a chased project.
For some reason it works only for the project on the first line (A in this case). If I would switch A and B on the first 2 lines then I would get only the IRR for B and zero for A.
Any idea why it does not work for all projects?
Thanks in advance for any help


Project Date CF
A 01/01/13 -50,000.00
B 01/01/13 -40,000.00
A 01/07/13 20,000.00
B 01/07/13 14,000.00
A 01/12/13 20,000.00
B 01/12/13 14,000.00
A 01/02/14 20,000.00
B 01/02/14 14,000.00

=XIRR(IF(A2:A9=E2,C2:C9,0),IF(A2:A9=E2,B2:B9,0))
(Cell E2 has the Project letter)

B A
0.0% 24.7%
 
Last edited:

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
For B the result is the same as:


Excel 2010
OPQR
1ProjectDateCF
2A00/01/19000.000.000000298%
3B01/01/2013-40,000.00
4A00/01/19000.00
5B01/07/201314,000.00
6A00/01/19000.00
7B01/12/201314,000.00
8A00/01/19000.00
9B01/02/201414,000.00
Sheet1
Cell Formulas
RangeFormula
R2=XIRR(Q2:Q9,P2:P9)
 
Upvote 0
I'm looking for a solution that by only changing the Project letter in a specific cell (E2 in my case) would give the IRR value, without changing the data of the main table.
 
Upvote 0
Try the following formula, which needs to be confirmed with CONTROL+SHIFT+ENTER...

=XIRR(N(OFFSET($C$2:$C$9,SMALL(IF($A$2:$A$9=E2,ROW($A$2:$A$9)-ROW($A$2)),ROW(INDIRECT("1:"&COUNTIF($A$2:$A$9,E2)))),0,1)),N(OFFSET($B$2:$B$9,SMALL(IF($A$2:$A$9=E2,ROW($A$2:$A$9)-ROW($A$2)),ROW(INDIRECT("1:"&COUNTIF($A$2:$A$9,E2)))),0,1)))

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,215,619
Messages
6,125,872
Members
449,267
Latest member
ajaykosuri

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