Hi all,
In the attached excel file:

Interest.xlsx

I've got a time period "C3:D3" (time periods can be altered by user) and a sum of money for which i need to calculate interest across different time periods with different interest rates.
You can check out my formula in "E6:E" but somehow I'm not postive it's correct.
I want the formula to divide days of the above period of time across the different int. rates time frames (return "0" when int.rates times frames are before or after my time period).

Also, I'm not certain how to handle the last int. rate time frame (ie the last time int. rate was changed so it's not a closed time frame B50:C50). I have the last date int. rate was changed in B50 and C50 equals above mentioned D3. Does it make any sense?

Thanks for any help!