Here is the revised formula. It uses a cut-off date 1825 days from acquisition inclusive and MAX is no longer needed.
Formula:
=IF(AND(D6>=$J$5,D6<=$K$5),(EOMONTH(D6,0)-D6+1)*E6*H6/365,
IF(AND(D6-1+E6/(H6/365*E6)>=$J$5,D6-1+E6/(H6/365*E6)<=$K$5),E6-(EOMONTH($J$5,-1)+1-D6)*E6*H6/365,
IF(OR($K$5<D6,$J$5>D6-1+E6/(H6/365*E6)),0,DAY($K$5)*E6*H6/365
)))
Bookmarks