Handle and Locking With Dollar Signs Part 2
- 02:53
Using dollar signs to lock rows.
Glossary
$ sign Absolute Reference F4 locking cellsTranscript
I want to build up some calculations here. I notice that I've got venue coffee costs above hotel and and above food, and I also notice in my assumptions, I've got them in the same order. So that's matrix integrity. I'd really love to use that to my advantage so that I fill in just one and then fill it to the right and then fill that down.
Let's build up the first one here. So I press equals and I notice each of these three items, venue, hotel, and food, have similar assumptions. They're all cost per day and per participant. Again, that's helping with my matrix integrity.
So I'm going to click on the two venue coffee costs, multiply that by the number of days, 20. Multiply that by the number of participants, 200. Great.
If I press enter, I get 8,000.
However, let's predict what's going to happen when I copy this or fill this to the right. My venue coffee cost per day, that's going to move from C30, oh no, into the empty D30. I need to lock the C. So I click into the formula and I put a dollar sign before the C of C30. When I fill it down, that two of C30 will correctly move down, so I don't lock the 30. What's going to happen to C35, this number of days 20? Well, when I copy it to the right, this will correctly move to D35. That's great, but when I copy it down or drag it down, C35 and C36 will incorrectly move down into this empty cell.
I need to lock C35 onto row 35, so I need a dollar sign before the 35 and before the 36. I now press enter. Let's drag it to the right by grabbing that fill handle, click and drag and drag it down. Let's check that that's worked out correctly. I'm going to click into the formula for hotel cost. Hotel costs 150, multiply by 20, multiply by 200. That's perfect. Let's click into the formula for food costs.
Food costs 50 per day, times five, times 25. Of costs two. Perfect.