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
- Login or register to post comments
- 23789 reads
Recent comments
5 years 45 weeks ago
6 years 31 weeks ago
6 years 43 weeks ago
6 years 46 weeks ago
6 years 47 weeks ago
7 years 6 days ago
7 years 8 weeks ago
7 years 9 weeks ago
7 years 9 weeks ago
7 years 9 weeks ago