MichaelBur
New Member
- Joined
- Jul 28, 2011
- Messages
- 1
To start, I'm using Windows 7/ Excel 2007
I need to calculate IRRs for many "investments" that have varying numbers of transactions. The data is listed in four columns A-D (Name, Transaction Type, Date, Amount) and is sorted by Name first and Date second. There are well over 5,000 records for nearly 200 investments (if this makes a difference). There are three transaction types (IN, OUT and MV). Each investment has only one Market Value which is always the last record for that investment, and the sign for the MV is always the same as the sign of the Inflow transaction type.
I'd like to have a fifth E column "XIRR" where I could type the formula into the first record's row and copy it down. I want the formula to find rows that have the transaction type "MV" and perform the function there (or perform the function everywhere and only be visible there).
I've been using the IF function to first only show the formula on the rows with MV records, then performing the XIRR function and last I come in and adjust the data range from there. It gets a little cumbersome to do that with 5,000 records.
The formula I use is =IF(B2="MV",XIRR(D1:D2,C1:C2),"")
Can I do this without code? If not, can you help me with the code?
I'm sorry I can't post an example. I tried to figure out how to in the FAQ section but wasn't successful.
Thanks!
I need to calculate IRRs for many "investments" that have varying numbers of transactions. The data is listed in four columns A-D (Name, Transaction Type, Date, Amount) and is sorted by Name first and Date second. There are well over 5,000 records for nearly 200 investments (if this makes a difference). There are three transaction types (IN, OUT and MV). Each investment has only one Market Value which is always the last record for that investment, and the sign for the MV is always the same as the sign of the Inflow transaction type.
I'd like to have a fifth E column "XIRR" where I could type the formula into the first record's row and copy it down. I want the formula to find rows that have the transaction type "MV" and perform the function there (or perform the function everywhere and only be visible there).
I've been using the IF function to first only show the formula on the rows with MV records, then performing the XIRR function and last I come in and adjust the data range from there. It gets a little cumbersome to do that with 5,000 records.
The formula I use is =IF(B2="MV",XIRR(D1:D2,C1:C2),"")
Can I do this without code? If not, can you help me with the code?
I'm sorry I can't post an example. I tried to figure out how to in the FAQ section but wasn't successful.
Thanks!