Friday 27 September 2019

Excel 2010: Formula for Sum and Return Date

I have a workbook with a Summary sheet and a Data Set sheet with a linked table containing 700k+ records of financial data on investments. (In my particular case, it is real estate properties; but this is the same scenario as tracking stocks and dividends.) The Summary Sheet contains one row per property (investment) and shows the amount (of money) originally injected (i.e., input or invested) per property, with the expectation that the monetary output (or return on investment) will at some point equal that original injection/investment amount. The Data Set shows daily production (i.e., monetary output) per property, with one row per property per date (i.e., has many rows for each property) and cannot be edited. It should be noted that the PropName column is unreliable (inaccurate/inconsistent), and so PropID should be used to correlate the two sheets.


I would like to have a formula in the "100% Recovery Date" column on the Summary sheet that will tell me the date that the total (cumulative) Output reaches or exceeds 100% of Input (i.e., the date that the investment has been recouped). I assumed that I would need a formula to do the following, though I may be wrong:




  1. Sum all production (return on investment) data for each Property, from oldest to newest (data set is already sorted this way),


    UNTIL it reaches 100% of the Original Input/investment (shown in Total Input column on Summary sheet),




  2. then return the date (located in a field in the Data Set sheet) when 100% recovery is met,




  3. If 100% recovery is not met, return "TBD".




For example, the desired 100%RecoveryDate for property 0764 (“Prop 1”) would be 6/7/2013 (from the sixth data row of the Data Set sheet) because 1.667000055+ 5.000999928 +1.667000055 + 3.334000111 + 5.000999928 (from the first six rows of the Data Set sheet) = 16.670000077, which is greater than 13 (Total Input for property 0764).


Any and all constructive feedback is welcome and most appreciated!


Sample of Summary Sheet:


PropID   PropName   TotalInput   CurrentOutput  100%RecoveryDate  ProgressToRecovery
0764 Prop 1 13 71,820 189%
0736 Prop 2 30,711 134,746 439%
1680 Prop 3 25,014 52,887 211%
4078 Prop 4 29,494 36,705 124%
5226 Prop 5 43,983 41,438 94%
6427 Prop 6 28,786 50,855 177%
6683 Prop 7 19,231 60,501 315%
6739 Prop 8 28,350 48,229 170%
9153 Prop 9 37,888 28,125 74%
8020 Prop 10 31,429 41,094 131%

Sample of Data Set:


PropID   PropName     Date          Output
0764 Prop 1 6/1/2013 1.667000055
0764 Prop 1 6/3/2013 5.000999928
0764 Prop 1 6/7/2013 1.667000055
0764 Prop 1 6/10/2013 3.334000111
0736 Prop 2 6/19/2013 361
0764 Prop 1 6/19/2013 5.000999928
0764 Prop 1 6/22/2013 6.668000221
0764 Prop 1 7/12/2013 3.334000111
1680 Prop 3 7/17/2013 389
0764 Prop 1 7/23/2013 10.00200081
0736 Prop 2 8/2/2013 236
4078 Prop 4 8/22/2013 236
0764 Prop 1 8/25/2013 6.668000221
0764 Prop 1 8/30/2013 3.334000111
0764 Prop 1 8/31/2013 5.000999928
0764 Prop 1 9/11/2013 1.667000055
6427 Prop 6 9/15/2013 1018
1680 Prop 3 9/16/2013 389
0764 Prop 1 9/20/2013 6.668000221
0764 Prop 1 9/22/2013 10.00200081
0764 Prop 1 9/23/2013 10.00200081
5226 Prop 5 9/23/2013 125

No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...