Handle and Locking With Dollar Signs Part 1
- 04:38
Using dollar signs to lock columns.
Glossary
$ sign Absolute Reference F4 locking cellsTranscript
We've got some calculations in ourselves here. I've got the course leader costs and the teaching assistant cost for course one and course two, but I'd like to show you a much quicker way to do this. So I'm going to empty out a couple of these cells to get us just back to the course leader costs for course one. What I can do is I can grab with my mouse this handle, this fill handle at the bottom right of the cell that we're in. I'm going to click on that, I'm going to hold it and drag to the right, and what I notice is that where I was linking to the 5,000 course leader cost per day multiplied by the 20 days when I went to the right, the number of days has correctly moved from course one to course two. However, we've got a slight problem that the course leader cost of 5,000 has now moved to an empty cell. What I'd like to do is I'd like to do that again, but I want to lock onto column C, the 5,000 in C26, I want to lock it onto column C, so the C does not change to a D.
So I'm gonna click into the formula here and I'm going to put a dollar sign just before the C of C26, and that's going to lock so that that C doesn't change.
I press enter and now let's grab that fill handle pull to the right. Hey, that's worked great.
As I filled to the right, the C26 remains locked, but D35 didn't. That's great. What I now notice is that I've got in my assumptions, course leader, then TA, then venue training, then venue internet. And in my outputs I've got them in the same order. Also, I've got course one to the left of course two in my assumptions and the same in my outputs, and that's called matrix integrity, everything's in the same order. And we can use this enormously to our advantage. I'm really tempted to grab that fill handle, pull to the right and then pull it down and see if it works. Oh, and unfortunately it hasn't quite worked yet, but we can fix it with just one thing. I noticed when I went down to the teaching assistant cost, ah, my teaching assistant cost, that should have stayed locked on the number of days, 20, but annoyingly it went down to participants. I really need to lock the row 35, row 35 if I could lock onto that, that would sort me out. So what I'm gonna do is I'm gonna click into the formula bar and I'm going to put a dollar sign just before that 35. Now, if I were to drag it down, the 35 would stay locked.
Let's try filling it to the right to drag that handle to the right and now let's drag it down and let's check what's happened. My course leader cost as I went down, yes, the cost per day moved correctly down to 2,500, but the number of days stayed in row 35. When I went to the right, the number of days correctly moves from C to D, but again, it stayed locked in 35.
My venue training costs that moved down from C26 and C27 correctly to C28. The number of days stayed still, so I was very quickly able to fill in these eight cells by just making two little locks to this first formula. Here I locked column C for C26, and I locked row 35 from C35, and then just drag it right and drag it down.