Teach Yourself Excel Lesson 22 - VLOOKUP Formula

VLOOKUP Formula
Now, it has occurred to me that I can save time when entering future expenses because I have realised that I can pretty much categorise the expenses.
- Eating out is unnecessary
- (most) computer expenditure is necessary
...so instead of populating the "Necessary?" field myself, I can use a formula to guess, then type over the formula if I disagree with the categorisation.
Steps to use the VLOOKUP formula:
- In J3, type: "Expense Type"
- In K3, type: "Necessary?"
- In J4, type: "Eating Out"
- In J5, type: "FALSE"
- In K5, type: "TRUE"
- Select column C
- Choose Data menu on your ribbon
- Select "Data Validation"
- Choose "Any Value" to turn off the data validation we added earlier.
- In C2 type: =VLOOKUP(B2,$J$3:$K$5,2,FALSE)
- Copy this formula down.
Note:
- The formula uses the table to populate the cells.
- The other advantage of using this formula is that if you want to change the categorisation of all entries for "Eating Out", you only need to change it in one place: cell K4 and recalculate.
- If you add Expense types, you will need to change the formula appropriately.
- so adding one expense type in J6, would mean that you need to change the formula in C2 to: =VLOOKUP(B2,$J$3:$K$6,2,FALSE) then copy it down.
- Alternatively, you could use =VLOOKUP(B2,$J$3:$K$500,2,FALSE) to allow 500 or so expenses to be added, and then you never have to change the formula again.
Your sheet should now look like this
Next Lesson: Teach Yourself Excel Lesson 23 - Find And Replace
Training Video on the VLOOKUP Formula in Excel:
| Attachment | Size |
|---|---|
| vlookup-formula.xls | 21.5 KB |
»
- Nick's blog
- Add new comment
- 5366 reads

Recent comments
7 hours 10 min ago
7 hours 11 min ago
8 hours 36 min ago
8 hours 47 min ago
8 hours 58 min ago
9 hours 14 min ago
17 hours 50 min ago
19 hours 45 min ago
1 day 12 hours ago
1 day 12 hours ago