I have an excel sheet that represents a real world savings account which interest is compounded daily but paid out monthly. It looks like:
For clarity, I will call each row in the "Interest Calculating Table" a transaction. The basic information (date, amount, source) for each transactions is dynamically added to the sheet in a sorted way. As you can see the sheet is responsible for keeping track of the starting and ending balance in the account after each transaction.
The sheet also has to act as an interest bearing savings account in which interest is accrued daily but paid monthly. To do this, for each transaction, it calculates the daily compounded interest that was accumulated between the previous transaction and current transaction. It adds this value to any previously calculated interests to create a monthly rolling sum of daily interest payments (the accrued interest column). Upon seeing a transaction that contains the source of "Interest Paid", the rolling count of gained interest is dumped into the the savings account balance and thus the requirement for "interest calculated daily and paid monthly" is realized.
The formula for the interest column to calculate the compounded daily interest calculations in between the previous transactions and the current transaction is: Previous Ending Balance * (1 + APR/365) ^ ((365 * Days in between previous transaction and current transaction) / 365))) - Previous Ending Balance.
Using that base formula, a set of if then statements in the interest cell checks if the interest that was gained between the last transaction and the current transaction starts a new rolling interest count (interest starts accruing from 0 at the beginning of the month) or appends to the existing rolling interest count.
For completeness sake, I have included the formula below as well as a description of the cases.
1.) If the current transaction is an "interest paid transaction" and the previous transaction is an "interest paid transaction". In this case, the interest that was gained between the last transaction and the current transaction is apart of a new rolling interest count.
2.) If the current transaction is an "interest paid transaction" and the previous transaction is not an "interest paid transaction". In this case, the interest that was gained between the last transaction and the current transaction is apart of a the current rolling interest count.
3.) If the current transaction is not an "interest paid transaction" and the previous transaction is an "interest paid transaction". In this case, the interest that was gained between the last transaction and the current transaction is apart of a new rolling interest count.
4.) If the current transaction is not an "interest paid transaction" and the previous transaction is not an "interest paid transaction". In this case, the interest that was gained between the last transaction and the current transaction is apart of a the current rolling interest count.
My issue is that I am encountering an offset issue in my interest calculations from what the bank is reporting.
On 2/28/2019, the bank reported an interest paid of $2.62 where I got $2.26.
On 3/29/2019, the bank reported an interest paid of $13.38 where I got $12.30.
On 4/30/2019, the bank reported an interest paid of $16.55 where I got $17.37.
I do know that there will be a small variation due to banking rounding errors, however they should not be as far off as I'm getting. I'm confident my daily interest accrual equation is wrong, but I'm not sure which one to use.
Note: Interest rate and APY is shown in the table.

^ (365 * DATEDIF(B9,B10,"D") / 365)seems to be the^(nt)portion, but is equivalent to just^ DATEDIF(B9,B10,"D"). Wouldn't cause any problems but I just wondered if there was a reason for it, like cleaning up a quirk in Excel or something. – Hart CO May 04 '19 at 13:48