2. In this way, a "Debit" appears in cell G6, then select the corresponding cell in the "Balance" column, enter "=IF(G5=" Debit ",H5+E6-F6, E6-F6-H5)", and press enter, which means that when cell G5 displays "Debit", cell H6 is equal to H5.
3. At this time, the amount due will also appear in the balance column, and then select the G6 cell where the debit/credit function has just been entered. When the cursor moves to the lower right corner of the cell and changes from hollow+word to solid+word, hold down the left mouse button and drag it down along the "direction" cell until the account ends. This process is also a process of copying the function in G6 cell to other "direction" cells according to the corresponding relational variables.
4. At this time, "Debit" or "Credit" appears in the corresponding cell.
5. Copy the function variables in the balance cell H6 to the corresponding position in the same way, and the corresponding balance will be automatically calculated at this time. Because of the data in the balance, the previous "borrowing" direction has also changed, so that an electronic account that automatically calculates the direction and balance will be available.
Precautions:
When the debit amount and credit amount are both 0, the number 0 should also be filled in, otherwise the following function formula cannot be calculated.