Flipping from horizontal to vertical, journal entry

  D C C C C C C
Account Z 7 5 6 4 8 9
Balance   10 15 20 25 30 35

This is a matrix which is a base for journal entry. The first row defines whether posting is for debit or credit side. The second level is account and third posting balance. The first posting should be debit z 10, credit 7 10, second debit z 15, credit 5 15 and so on.

The idea is to have some automation to fill Excel template which is imported to ERP to create a journal entry in general ledger. Some Excel functions are needed that the whole process would not be manual.

The matrix in this case holds just few records, but if the matrix was 100 records long, it would take long time to enter all the values separately manually to Excel.

We need INDEX function in this case. First you need to define matrix, after that you give row and columns coordinates inside matrix.

We need INDEX function in this case. First you need to define matrix, after that you give row and columns coordinates inside matrix.

To define z as debit account, we need to create account codes as matrix with one line. Debit account z is the first value in matrix, credit account 7 is the second value in matrix.

The posting balances are another one line matrix, but the first value should be blank, the second value is 10. Then balance 10 is in line with first credit account 7.

Range(B8:D19) is a basis for journal entry in more suitable format to be uploaded to ERP. This is only simplified example, you need also other inputs like posting date, description and so on.

Another modification is to have just one posting for debit side, then balance for z is 135. For me, it is clearer to have each debit and credit paired as above.