It is easy to make a worksheet just for a purpose of keeping the students' prepaid tuition fee and the amount they used after a lesson is delivered. I named this sheet "Lesson log". It consisted of 12 columns of Date, StudentID, StuName, ...AmountPaid, etc. I only realized after I have involved in the creation for one of the most basic accounting book, I naturally began to have new ideas of upgrading the function of my self-made worksheet.
The basic worksheet was aimed to instantly resolve Chenny's dire need for a ledger book. However, three or four weeks later, I noticed the Lesson log should have a column that fetches the balance amount from last record of the same student and calculates further by adding up his new payment and deducting one unit of fee if he had a lesson on that day. This requires a calculation for the Balance field in the worksheet. It sounds simple, but is very challenging to me because I was still new to the formulas configuration. I was virtually illiterate in this skill, so I started my self-taught process through Google on the internet. I believed there must be people asking for help with the formula they want to carry out a certain way of calculation.
My assumption was right, there were heaps of people like me asking all sorts of function the Excel can do, and there were at the meantime people who were knowledgeable on this area and were willing to teach. So I had read quite a lot of replies made to questions. For the Balance to behave like I have described above, I will have to learn functions of Index, If, Large, Row, Match; also learn their syntax and the formula comprises of several functions that will carry out a complicated calculation and bring up a result you expect to obtain.
Below is an example of my attempt to create a formula in the right end of the table. I want the formula to fetch from its current row of the Balance column the data of the same student ID. For instance,
ID | Fee charged | Payment received | Balance |
38 | 0.00 | 40.00 | 40.00 |
114 | 0.00 | 20.00 | 20.00 |
95 | 0.00 | 60.00 | 60.00 |
114 | 0.00 | 60.00 | 60.00 |
38 | 20.00 | 20.00 | |
95 | 20.00 | 20.00 | -40.00 |
114 | 0.00 | 60.00 | 120.00 |
88 | 20.00 | 60.00 | |
113 | 20.00 | -20.00 | |
I searched the web intensively. Because of reading a lot of the discussion posts and I am getting more familiar with the most used functions, I felt I had my own ideas for this Balance column.
Having determined to make the formula to do a series of calculation, I used my learned knowledge to write a few formulas. First of all I defined the names of the columns for easier reference in writing the formula. This can be found in the Data section on the menu bar and select "Define names". $A$2:$D$11 is referred to as SelectAll; $A$2:$A$11 is referred to StuID; $B$2:$B$11 is referred to FeeCharged; $C$2:$C$11 is referred to Payment; and $D$2:$D$11 is referred to Balance.
After innumerable trial and error. I had finally come up with one like this. Although I found other formulas that did the same calculation, but I liked to use this one that came about because of my effort.
=IFERROR(INDEX(SelectAll, MAX(if(StuID=$A2,1)*ROW($D$2:$D$11)),1),"")
--to be continued--
Having determined to make the formula to do a series of calculation, I used my learned knowledge to write a few formulas. First of all I defined the names of the columns for easier reference in writing the formula. This can be found in the Data section on the menu bar and select "Define names". $A$2:$D$11 is referred to as SelectAll; $A$2:$A$11 is referred to StuID; $B$2:$B$11 is referred to FeeCharged; $C$2:$C$11 is referred to Payment; and $D$2:$D$11 is referred to Balance.
After innumerable trial and error. I had finally come up with one like this. Although I found other formulas that did the same calculation, but I liked to use this one that came about because of my effort.
=IFERROR(INDEX(SelectAll, MAX(if(StuID=$A2,1)*ROW($D$2:$D$11)),1),"")
--to be continued--