XIRR for visible range

Sotu322

New Member
Joined
Aug 20, 2022
Messages
14
Office Version
  1. 2010
Platform
  1. Windows
I am using Excel 2010. U have filters in my data sheet. Need help as how to calculate XIRR on visible cells only.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Assuming that A2:A10 contains the values, and B2:B10 contains the corresponding dates, try the following formula that needs to be confirmed with CONTROL+SHIFT+ENTER, not just ENTER...

Excel Formula:
=XIRR(INDEX(A:A,N(IF(1,MODE.MULT(IF(SUBTOTAL(3,OFFSET(A2:A10,ROW(A2:A10)-ROW(A2),0,1)),ROW(A2:A10)*{1,1}))))),INDEX(B:B,N(IF(1,MODE.MULT(IF(SUBTOTAL(3,OFFSET(A2:A10,ROW(A2:A10)-ROW(A2),0,1)),ROW(A2:A10)*{1,1}))))),0.1)

Adjust the ranges accordingly.

Hope this helps!
 
Upvote 0
Assuming that A2:A10 contains the values, and B2:B10 contains the corresponding dates, try the following formula that needs to be confirmed with CONTROL+SHIFT+ENTER, not just ENTER...

Excel Formula:
=XIRR(INDEX(A:A,N(IF(1,MODE.MULT(IF(SUBTOTAL(3,OFFSET(A2:A10,ROW(A2:A10)-ROW(A2),0,1)),ROW(A2:A10)*{1,1}))))),INDEX(B:B,N(IF(1,MODE.MULT(IF(SUBTOTAL(3,OFFSET(A2:A10,ROW(A2:A10)-ROW(A2),0,1)),ROW(A2:A10)*{1,1}))))),0.1)

Adjust the ranges accordingly.

Hope this helps!
Thanks. Either i made an error or it didn't work. Pls help I am enclosing a sample sheet
 
Upvote 0
Thanks. Either i made an error or it didn't work. Pls help I am enclosing a sample sheet
 

Attachments

  • excel-query compressed.jpeg
    excel-query compressed.jpeg
    42.1 KB · Views: 36
Upvote 0
Please post your data as text, or download the add-in xl2BB to post your Excel range, so that we can copy and paste the data into our worksheet, and so that we can actually work with the data. Also, make sure that you provide an example, and include the actual results that you expect.
 
Upvote 0
Using Excel 2010
* Here I have the individual Investments and their individual XIRR
* * I would like to use the filters in Column A or B or C individually or in other combinations and find out the combined XIRR of the visible cells

mini sheet:

XIRR Sample Sheet query.xlsx
ABCDEFGHI
1SecurityAsset ClassSub TypeOutflow DateOutflow AmtInflow DateInflow AmtTime Invested in DAYSXIRR
2BGJ23-07-201811,01618-08-202226,989148724.60%
3BEH29-03-201916,40518-08-202227,804123816.83%
4DGI05-11-201815,32518-08-202230,043138219.46%
5BFJ15-11-201912,61618-08-202228,060100733.61%
6CEH28-04-201816,04918-08-202234,392157319.35%
7AGI20-07-201823,70618-08-202233,56814908.89%
8AEH30-11-201613,97118-08-202231,466208715.26%
9BGJ11-08-201615,49718-08-202230,132219811.67%
10BEH09-02-201722,96018-08-202226,84920162.87%
11AFI26-03-201813,15918-08-202226,148160616.89%
12BFJ02-02-201922,65918-08-202228,61312936.81%
13DGJ08-05-201511,31718-08-202226,728265912.52%
14DFH28-06-201914,99518-08-202229,453114723.96%
15CFI21-06-201615,11818-08-202231,014224912.37%
16AEH25-10-201922,24218-08-202234,102102816.39%
17AFI19-11-201711,27318-08-202230,389173323.23%
18AFH19-03-201611,36218-08-202230,553234316.66%
19DGI20-06-201713,54018-08-202225,947188513.42%
20CFJ17-10-201517,72018-08-202229,57624977.78%
21BFI18-01-201822,51818-08-202225,88416733.09%
Sheet3
Cell Formulas
RangeFormula
H2:H21H2=(F2-D2)
I2:I21I2=IFERROR((G2/E2)^(365/H2)-1,"")
 
Upvote 0
Please post your data as text, or download the add-in xl2BB to post your Excel range, so that we can copy and paste the data into our worksheet, and so that we can actually work with the data. Also, make sure that you provide an example, and include the actual results that you expect.
Posted. Please assist
 
Upvote 0
Based on the data that you posted, what should be the actual result that you expect?
 
Upvote 0
Based on the data that you posted, what should be the actual result that you expect?
Column A, B and C have variables. I want to find XIRR using filters say for column A- "A", column B-"F", column C-"I". OR in any other combinations.
Say I have data in rows 11 & 17, I can find the XIRR by copying these cells in another sheet and use XIRR
but if doing in the same sheet
XIRR does not consider the selected range but all the cells in that range i.e from rows 11 to rows 17 all cells.
 
Upvote 0
Sorry, but what is the actual number that you expect as a result when it's filtered? Can you provide an actual example?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,191
Members
453,021
Latest member
pingpong7117

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