Lookup Functions in Microsoft Excel: A Must Know For Every Analyst & Manager
Yesterday I wrote about the Text Functions in Microsoft Excel, and many of you contacted me for training on the Text and other useful Functions in Excel. Most of the people want to learn the Lookup functions in Excel – namely the Vlookup, Hlookup, and the other Lookup functions that are available in Excel 2016, Excel 2019 and Office 365 edition of Excel.
The most popular lookup functions in Excel (VLOOKUP & HLOOKUP) have been there since the first version of Microsoft Excel, and have stayed the same throughout. They have been the reason for people to learn and train on how to use Excel effectively.
I have seen that there are usually one or two people in the company who know how to use the Vlookup function. And they are revered for it. Others go to them for Excel sage advice. And if you ask them to teach you about the Vlookup function, they claim that it is too difficult for you to learn, and that you’d be better off if you just let them code it out for you. This way they retain their sole control over the Excel users as the Guru, and they try to be indispensable by this virtue.
Well, today, you can learn about the Vlookup function in no time. In our 2 or 3 day Advanced Excel classes in Singapore, we teach how to use the Lookup functions in Excel, what are the variations, when to use which type of function, and even the limitations of the Lookup functions in Excel… Yes, the Lookup functions that we all love to use also has its limitation. It can’t be used all the time.
|12, 13, 14 Oct 2022 (Classroom)|
|26, 27, 28 Oct 2022 (Classroom)|
|12, 19, 26 Nov 2022 (Classroom)|
|16, 17, 18 Nov 2022 (Classroom)|
|28, 29, 30 Nov 2022 (Classroom)|
When to Use the Vlookup Function in Excel:
This function can be used to pick the price, description, etc. for any part or the employee’s name, address, basic pay etc.
If you key in the product code, or the employee code, Vlookup can then lookup the correct price or description from the same row. The function basically will match the value in the first column, and lookup the relevant column from the same row of the lookup table, and present it to you.
This is extremely useful, as we can write a dynamic formula, which picks up the relevant value based on any key.
Variations of Vlookup Function in Excel
The Vlookup function can be used to match up an exact value, or an approximate value.
Both of these variations can save you immense time and are extremely quick to use.
The syntax of the Vlookup formula is VLOOKUP(what to lookup, Where to lookup, Which column to pick, approximate match or exact match flag)
With these 4 options specified, the Vlookup formula can be your secret weapon, your swiss army knife that gives you the edge in the workforce and makes you invincible!
Let’s say we have a table of employee numbers, and their names. Upon matching the employee number, I want to pick up the employee name. How can Vlookup do this
Employee Id Employee Name
123 John Smith
456 Rebecca Tan
789 Robert Lim
To pick up the name of the employee upon submitting the name, we can write
=Vlookup(456, A1:B3, 2, 0)
This means that we want to lookup the id of 456 in the lookup table beginning from row A1 to Column B3. Once matched, we want to pick up the second column, denoted by the 2, which is the name. And yes, we only want the name if the ID matches exactly. This is indicated by the last 0 in the formula. The ZERO (0) in the formula stands for an Exact Match indicator.
Once you write this VLOOKUP formula, the name of Rebecca Tan will popup up immediately. And if you substitute 456 with 789, the name will change to Robert Lim.
It is that simple… This Vlookup function works in all the versions of Excel – on the PC and on the Mac.
So if you have Microsoft Excel 2013 or Microsoft Excel 2016, or Microsoft Excel 2019, or maybe you have purchased the online subscription to the Microsoft Office 365 version, the VLOOKUP function works the same on all these versions.
How To Use VLOOKUP for an Approximate Match
If you don’t have an exact match in your lookup table, we can still use VLOOKUP. This is useful when we have a range of values that match a particular value.
For example, let’s take the case of a class that takes an exam, and we have to prepare the result. The result grade will be based on the marks. Most likely, the different people who took the test will get different marks, and their grades will be different.
So the grades table can be setup as this:
This means that if a student score any marks below 50, they will be deemed Failed. And anything from a score of 50 to 59.999 will give you a D grade. Similarly, at 90 or above, one will be receiving a Distinction. So with the Lookup table set, we can now write our VLOOKUP function.
=VLOOKUP(Students_Marks, Lookup_table, Column_Index_to_pick, TRUE)
In this pseudocode,
- the Students_Marks are the marks received by a student.
- Lookup_table referes to the grades table we setup earlier.
- The column_index is for the column we want to pick… which is 2, for we want the grade (from Fail, to D, C, B, A or Distinction).
- The last attribute in the formula – TRUE, denotes that this is going to be an approximate match.
So if a student secures 63 marks in the test, the formula will look like this:
=VLOOKUP(63, A1:B6, 2, TRUE)
This formula, when executed will generate the grade of C, which is correct. One gets a C if the marks are greater than or equal to 60, but less than 70.
Now this VLOOKUP formula will generate the correct grade, irrespective of the participant who may secure a 63 or a 63.5 or a 63.78. The grade will always turn out to be correct.
This is the use of the VLOOKUP function in Excel, with an Approximate match.
You must learn both variations of VLOOKUP for any version of Excel to be more effective and efficient with using Lookup functions in office work.
Similarly, you can use the HLOOKUP Function for Exact match or approximate match. The only thing different is that the lookup table is a horizontal table.
Don’t worry, we have examples, exercises and multiple scenarios to go through both VLOOKUP and HLOOKUP in our training courses.
And we cover them in great detail, so that you can master these Lookup functions of Excel that are in high demand in the job market for Excel jobs.
Learn to Use VLOOKUP & HLOOKUP Functions in Excel
If you would like to learn more about becoming an expert at using the VLookup Functions in Excel, you should sign up for our Vlookup Training in Singapore. You’ll learn a lot about Text Functions in Excel, or more advanced stuff like Pivot Tables, Macros, Advanced Sorting, Advanced Filtering, Advanced Charting.
You can attend our 3 day program, which attracts Government grants (for individual or company sponsored Singaporean or PR candidates), and leads to the industry certification of ( ICDL Certificate in Advanced Spreadsheets) from ICDL Asia.
Arrange for In-House Training for Microsoft Excel Lookup Functions
Most companies arrange for a in-house training on Excel or Photoshop certification training to train their entire staff in batches of 15-20 employees per batch. This is an excellent option to improve employee retention, increase their efficiency, and improve customer satisfaction.
Learn about the Corporate Training options, and get attractive discounts and grants when you arrange a corporate training at your office or at our training centre.
In the next article, I’ll talk about the date and time functions within Microsoft Excel.
If you would like anything else to be covered in the blog, you can let me know. Hope to see you at our Advanced Excel Training. I love to teach the Advanced Excel class, because it covers the Advanced Excel Formulas, Pivot tables, Macros, Charts, Sharing, Protection and much more. It is great to see newbies learn and discover the true potential of Excel in just 3 days.
Till then… All the Best!
Founder & CEO, Intellisoft Training Pte Ltd