jameslauf (8/1/2014)
Fixed my CODE and attaching Excel sheet to show desired output. see column N, O, P for results.
Looking at the expected results prompts few questions:
😎
1. Is this dataset for a single account?
2. Why would an earlier record be assigned the beginning balance from a later record, ie. row 10, 18?
3. Can you explain why a Accounts Payable account receives the beginning balance of an cash account from the same month? (row 19)
To obtain the results in the Expected results spreadsheet, simply do a self join on Trial_Balance_ID = Trial_Balance_ID - 1. Must say it seems illogical to me though.