The example with notes about problem is attached.
Shortly: I want to automatically calculate ending balances from small general ledger I keep in excel.
The formula should understand what account we are speaking of, what month is the transaction from and is the column debit or credit. I hope that the picture helps to understand what I am trying to accomplish.
I have tried with INDEX, MATCH, VLOOKUP & HLOOKUP, SUMIFS... but I have not been able to figure this out.
I would be very thankful for any notes or helpful hints.