Hardcoded Numbers Get Their Own Cell
- 04:31
Explaining that hardcoded numbers must get their own individual cell and why.
Glossary
Assumptions Hardcode Hardcoded Numbers Hardcodes inputsTranscript
This budget or model needs some calculations. So I'm very tempted to just scroll down, scroll down, and start calculating my course leader cost. I'm going to put some headings in just to delineate course one from course two, and my temptation, as I said, just start jamming in numbers, but this is really bad practice. Let me show you the bad practice. My course leader cost. If I go back to my boss's email, we were told that each course requires a course leader cost 5,000 per date, and course one was going to last 20 days. So what I could do is I could just go equals 5,000 multiplied by 20. And course two I could put in as well, but don't do this. This is such bad practice. 5,000 multiplied by five days.
Now technically these costs are correct, but the problem is I can't audit them. If I send them to my boss, my boss is going to ask me, what the hell are these numbers? Are they 5,000 participants? 5,000 days? What is it? Is it 20 people? 20 days? 20 currency? There's no way for me to audit them. And if I come back to the numbers in three months time, I'll have no idea either. So best practice, and this is probably the most important thing that we can teach in Excel, is that every assumption gets its own input cell. So my course leader cost per day, I can hard code my number into its own cell. I never, never, never, never hard code numbers into a formula like this. So 5,000 gets its own cell. Now, the number of days, again, I'm going to put some titles, course one and course two. The number of days was 20 days for course one and five days for course two, I could now go and calculate the course leader cost by linking to those cells. So I'd now go up to the 5,000, click on it with my mouse to get C26, and then I multiply with the asterisk symbol. I multiply that by and I click on the 20. That's C35. I could do exactly the same for course two. I could press equals, click on the 5,000, multiply using the asterisk, and then click on the five.
Now, if my boss asks me, Hey, where's this 100,00 come from? I could click into the formula. It highlights the cells that are being linked to and they've got a clear description next to them. Ah, the course leader cost per day is 5,000, and I've multiplied that by the number of days, which is 20.
Even if you have to come back to it in three months time, you'll easily be able to understand where all of the figures have come from. So hardcoded numbers, get their own cell. That's possibly the most important thing that I could teach you in Excel. These costs here, I'm going to delete them. I want to come back and I want to show you how to do 'em in a slightly different way later. But let's get all of the other assumptions in. So the other assumptions, they're all coming from up the top here. Our teaching assistants cost per day. That was 2,500, so I just type that in. The venue training room, that was 15,000 a day.
Venue internet access 250. Venue coffee cost is two per day per participant.
Hotel 150 per day per participant, and food is 50.
The number of days we've done, but the number of participants we had 200 for course one, and we're going to have 25 for course two. So we'll type them in here. Great. All of my assumptions are in all of those hard codes. Got their own cell.