The next topic that we're going to discuss is cell locking. Cell locking is a powerful tool that is used extensively in Excel. As we saw in the previous section, Excel uses relative references within formulas. This means that it will automatically move the cells that are being referenced when the formula is pasted across rows or columns. Sometimes this is exactly what you want to do, but not always. This is where cell locking comes into play when you do not want Excel to move across rows and columns using relative references. Cell locking basically tells Excel not to move the reference when copying and pasting. A locked cell is indicated by a dollar sign. A dollar sign in the front of a column letter locks the column and a dollar sign in front of the row number locks the row. If you put a dollar sign in both the front letter and the back row number, you lock the cell entirely. You can lock the cell by manually typing out the dollar sign or by using the F4 shortcut key to place the dollar signs in a different combination around the row, column, both, or none. Cell locking helps increase efficiency when performed correctly, and also helps you avoid hard coding values within a formula. Second, I find many spreadsheet errors come from lack of cell locking or hard coding. Let's practice cell locking. In exercise 1, we're being asked to calculate the monthly savings using a five percent growth rate. That can be found in cell L12. We're going to start by calculating the savings in February by applying the five percent growth rate to January savings of $100. We start by typing equals followed by the amount of the savings in January, which can be found in G12. We then multiply the value by 1 plus the growth rate, which can be found in L12. As you can see, the savings for February will be $105. The same formula can be used to calculate the remaining months. So let's copy down the rest of the tables. Notice that something must have gone wrong, since the savings for the rest of the month remained constant instead of growing by five percent. If we go into the savings for June and press F2 to open the function, we can see that Excel is trying to use a growth rate in cell L16 instead of referencing the five percent in L12. As discussed, before we move the formula down one row and the reference will move the exact same manner. This is a perfect example of how Excel uses relative references. When we copy the formulas down, Excel automatically increase the row numbers for the amount of savings, which is good. But it also will increase the row number for the growth percentage, which is not what we wanted. We wanted that five percent being multiplied by each month. We can use cell locking to tell Excel that we do not want it to increase the row numbers for the growth rate. In order to do so, let's go back to the formula for February, and if we press F2, it opens the formula and let's us edit it. When we lock both the column and the row, we're going to add a dollar sign in front of both the L and the 12. Now the formula is ready for copying down. Let's copy and paste it down the table. As you can see, the savings grows every month. We're going to do the same thing for savings in column H. Only this time, we will be using the F4 shortcut to lock down our growth rate. First, let's write our growth rate formula for February the same way we did before. As we can see, this calculates the correct value for February. However, we already know we can't copy this value down unless we lock in the growth rate. In order for us to lock cell L12, we click on the reference within that formula and then press F4 to lock it. As you can see, Excel puts in dollar signs locking the cell entirely when you click F4 for the first time. Now if we press F4 again, we notice one of the dollar signs is removed. The cell row has now been locked, but the column has not. If we press F4 again, we see the dollar sign has moved from the row to the column, and if we did it one more time, we go back to the cell being unlocked. We want to lock the growth rate. So let's press F4 one more time to do that. Now the formula is ready to be copied down. As you can see, the growth rate is calculated correctly for each of the months. Now it's your turn to practice cell locking with exercise 1B. Remember that you can lock the cell entirely by adding the dollar sign manually or by using the F4 shortcut.