Hi,
Need help with the below issue.
I have a dataset with multiple investment accounts for which I want to calculate the XIRR on a recurring/ongoing basis. Sample data for 2 accounts below
Account 1
Account 2
The XIRR formula used is based on help from XIRR function with 1 value from another cell and it works perfectly when used for a single account.
Without using VBA, I want to combine all the accounts into a single table that can be filtered/sorted as per the user's choice and I am wondering if the XIRR formula can be modified so as to return the correct XIRR for a specific account (i.e. Account1 or Account2) even when used in the combined dataset.
I saw the post: Calculate XIRR for a specific "item" from a table that's sorted by date but given my limited expertise I am unable to utilize/modify that formula for the above scenario
Any help would be greatly appreciated.
~kg
Need help with the below issue.
I have a dataset with multiple investment accounts for which I want to calculate the XIRR on a recurring/ongoing basis. Sample data for 2 accounts below
Account 1
Book1 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
B | C | D | E | F | G | H | I | |||
2 | Account | Date | Particulars | Employee Contribution ($) | Employer's Contribution ($) | Total ($) | Total Fund Value | XIRR | ||
3 | Account-1XY | 18-Jan-2018 | By Contribution | $840.40 | $0.00 | $840.40 | ||||
4 | Account-1XY | 31-Mar-2018 | Closing Balance | $804.16 | -20.02% | |||||
5 | Account-1XY | 3-Apr-2018 | By Contribution | $5,976.40 | $0.00 | $5,976.40 | ||||
6 | Account-1XY | 29-Jun-2018 | Closing Balance | $6,862.69 | 2.58% | |||||
7 | Account-1XY | 28-Sep-2018 | Closing Balance | $6,944.00 | 3.67% | |||||
8 | Account-1XY | 31-Dec-2018 | Closing Balance | $7,023.85 | 3.96% | |||||
9 | Account-1XY | 31-Mar-2019 | Closing Balance | $7,341.50 | 7.56% | |||||
10 | Account-1XY | 28-Jun-2019 | Closing Balance | $7,392.99 | 6.65% | |||||
11 | Account-1XY | 30-Sep-2019 | Closing Balance | $7,288.55 | 4.50% | |||||
12 | Account-1XY | 31-Dec-2019 | Closing Balance | $7,610.96 | 6.42% | |||||
13 | Account-1XY | 24-Feb-2020 | By Contribution | $4,976.40 | $0.00 | $4,976.40 | ||||
14 | Account-1XY | 18-Mar-2020 | By Voluntary Contributions | $25,000.00 | $0.00 | $25,000.00 | ||||
15 | Account-1XY | 31-Mar-2020 | Closing Balance | $35,550.37 | -8.51% | |||||
16 | Account-1XY | 30-Jun-2020 | Closing Balance | $40,585.88 | 14.94% | |||||
17 | Account-1XY | 30-Sep-2020 | Closing Balance | $43,211.20 | 18.12% | |||||
18 | Account-1XY | 31-Dec-2020 | Closing Balance | $51,260.76 | 30.33% | |||||
19 | Account-1XY | 23-Mar-2021 | By Voluntary Contributions | $1,500.00 | $0.00 | $1,500.00 | ||||
20 | Account-1XY | 31-Mar-2021 | Closing Balance | $54,652.75 | 27.95% | |||||
sample data |
Cell Formulas | ||
---|---|---|
Range | Formula | |
I3:I20 | I3 | =IFERROR(XIRR(IF(ROW($C$3:C3)=ROW(C3), -1*($H$3:H3))+$G$3:G3, $C$3:C3),"") |
Press CTRL+SHIFT+ENTER to enter array formulas. |
Account 2
Book1 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
K | L | M | N | O | P | Q | R | |||
2 | Account | Date | Particulars | Employee Contribution ($) | Employer's Contribution ($) | Total ($) | Total Fund Value | XIRR | ||
3 | Account-2AB | 18-Jan-2018 | Tier-2 Contribution | $2,076.40 | $0.00 | $2,076.40 | ||||
4 | Account-2AB | 31-Mar-2018 | Closing Balance | $1,970.11 | -23.39% | |||||
5 | Account-2AB | 3-Apr-2018 | Tier-2 Contribution | $4,976.40 | $0.00 | $4,976.40 | ||||
6 | Account-2AB | 29-Jun-2018 | Closing Balance | $6,926.56 | -5.87% | |||||
7 | Account-2AB | 28-Sep-2018 | Closing Balance | $7,085.45 | 0.85% | |||||
8 | Account-2AB | 31-Dec-2018 | Closing Balance | $7,172.04 | 2.10% | |||||
9 | Account-2AB | 31-Mar-2019 | Closing Balance | $7,579.57 | 7.08% | |||||
10 | Account-2AB | 28-Jun-2019 | Closing Balance | $7,765.43 | 7.71% | |||||
11 | Account-2AB | 30-Sep-2019 | Closing Balance | $7,751.81 | 6.27% | |||||
12 | Account-2AB | 31-Dec-2019 | Closing Balance | $8,066.27 | 7.72% | |||||
13 | Account-2AB | 24-Feb-2020 | Tier-2 Contribution | $4,976.40 | $0.00 | $4,976.40 | ||||
14 | Account-2AB | 31-Mar-2020 | Closing Balance | $10,336.73 | -12.01% | |||||
15 | Account-2AB | 30-Jun-2020 | Closing Balance | $11,917.06 | -0.63% | |||||
16 | Account-2AB | 30-Sep-2020 | Closing Balance | $12,680.75 | 3.04% | |||||
17 | Account-2AB | 31-Dec-2020 | Closing Balance | $14,861.62 | 10.88% | |||||
18 | Account-2AB | 23-Mar-2021 | Tier-2 Contribution | $1,500.00 | $0.00 | $1,500.00 | ||||
19 | Account-2AB | 31-Mar-2021 | Closing Balance | $17,054.77 | 11.83% | |||||
sample data |
Cell Formulas | ||
---|---|---|
Range | Formula | |
R3:R19 | R3 | =IFERROR(XIRR(IF(ROW($L$3:L3)=ROW(L3), -1*($Q$3:Q3))+$P$3:P3, $L$3:L3),"") |
Press CTRL+SHIFT+ENTER to enter array formulas. |
The XIRR formula used is based on help from XIRR function with 1 value from another cell and it works perfectly when used for a single account.
Without using VBA, I want to combine all the accounts into a single table that can be filtered/sorted as per the user's choice and I am wondering if the XIRR formula can be modified so as to return the correct XIRR for a specific account (i.e. Account1 or Account2) even when used in the combined dataset.
I saw the post: Calculate XIRR for a specific "item" from a table that's sorted by date but given my limited expertise I am unable to utilize/modify that formula for the above scenario
Any help would be greatly appreciated.
~kg