WallStreetMojo

WallStreetMojo

WallStreetMojo

MENUMENU
  • Blog
  • Free Video Tutorials
  • Courses
  • All in One Bundle
  • Login
Home » Excel, VBA & Power BI » Excel Tutorials » VLOOKUP Tutorial in Excel

VLOOKUP Tutorial in Excel

By Twinkle SethiTwinkle Sethi | Reviewed By Dheeraj VaidyaDheeraj Vaidya, CFA, FRM

Excel VLOOKUP Tutorial

In this Excel VLOOKUP tutorial, we discuss what is the VLOOKUP Function in Excel, how it works along with practical examples. The VLOOKUP (vertical lookup) function in Excel looks up a piece of information or value from one column of a table or dataset and extracts and returns some corresponding value or information from another column.

VLOOKUP function in Excel is a built-in function and is named so because the formula looks for value and searches it vertically down a specific column. It stops as soon as it finds that value and looks to the right of that value in a column that we specify.

VLOOKUP Tutorial in Excel

General Syntax for the VLOOKUP function is as follows:

Vlookup formula

The VLOOKUP formula syntax has the following arguments:

  • Lookup_value: Required, represents the value that we want to look up for in the first column of a table or dataset.
  • Table_array: Required, represents the dataset or data array that is to be searched.
  • Col_indexnum: Required, represents the integer specifying the column number of the table_array that we want to return a value from
  • Range_lookup: Optional, represents or defines what the function should return in case it does not find an exact match to the lookup_value. This argument can be set to ‘FALSE; or ‘TRUE,’ where ‘TRUE’ indicating an approximate match (i.e., use the closest match below the lookup_value in case the exact match is not found), and ‘FALSE’ indicating an exact match (i.e., it returns an error in case the exact match is not found). ‘TRUE’ can also be substituted for ‘1’ and ‘FALSE’ for ‘0’.

Examples

You can download this VLOOKUP Tutorial Excel Template here – VLOOKUP Tutorial Excel Template

Example #1

Let us suppose we have a student records table consisting of their roll number, name, class, and email ID. Now, if we wish to get the email ID of a particular student from this database, we use the VLOOKUP function as follows:

=VLOOKUP(F2,A2:D12,4,1)

Vlookup Tutorial Example 1

We can see that the formula above looks up the value 6 in the leftmost column of the student records’ table. The third argument with value 4 tells the function to return the value in the same row from the fourth column of the student records’ table. The last argument mentioned as 1 (TRUE) tells the function to return an approximate match (exact match if it exists).

Vlookup Tutorial Example 1-1

So we can see that the email ID of roll no 6 is correctly extracted and returned with this function.

Popular Course in this category
Sale
All in One Excel VBA Bundle (35 Courses with Projects)
4.9 (1,353 ratings)
35+ Courses | 120+ Hours | Full Lifetime Access | Certificate of Completion
View Course

Example #2

Now, let’s say we use an exact match for a lookup value that does not exist, then VLOOKUP function will work as follows:

=VLOOKUP(F2,A2:D12,4, 0)

Vlookup Tutorial Example 2

We can see that the formula above looks up the value 16 in the leftmost column of the student records’ table. The third argument with value 4 tells the function to return the value in the same row from the fourth column of the student records’ table. The last argument mentioned as 0 (FALSE) tells the function to return an exact match, and an error if an exact match is not found.

So we can see that the email ID of roll no 16 does not exist as there is no value as roll no 16 in the student records’ table, so the ‘#N/A’ error is returned with an exact match argument.

Example 2-1

Example #3

Now, let’s say we use an approximate match for a lookup value that does not exist, then VLOOKUP function will work as follows:

 =VLOOKUP(F2,A2:D12,4, 1)

Example 3

We can see that the formula above looks up the value 16 in the leftmost column of the student records’ table. The third argument with value 4 tells the function to return the value in the same row from the fourth column of the student records’ table. The last argument mentioned as 1 (TRUE) tells the function to return an approximate match if the exact match is not found.

So we can see that there is no value as roll no 16 in the first column of the student records’ table, but the fourth argument mentioned as 1 or TRUE tells of returning an approximate match, so the function will return the largest value smaller than 16 (12 in this case), so email ID of roll no 12 is returned.

Example 3-1

Things to Remember

  • VLOOKUP function is a built-in function in Excel categorized as a Lookup/Reference Function.
  • It can also be used as a worksheet function where the function can be entered as part of a formula in a cell of a worksheet.
  • VLOOKUP always looks right, i.e., it requires a lookup table with lookup values in the left-most column. The data we wish to retrieve as result value can appear in any column to the right, i.e., the lookup value is to the left of the result value we wish to find.
  • The argument ‘table_array’ provided to the VLOOKUP function must be at least as many columns wide as the value of argument ‘col_indexnum.’
  • It is designed to retrieve data in a table that is organized into vertical rows, where each row represents a new record. So, if the data is organized horizontally, then we can use the ‘HLOOKUP’ (horizontal lookup) function.
  • VLOOKUP function returns any data type like numeric, date, string, etc.
  • VLOOKUP function allows the use of wildcards like ‘*.’
  • If ‘FALSE’ or ‘0’ is specified for the approximate_match parameter, and no exact match is found for the lookup value, then the VLOOKUP function returns ‘#N/A’ error.

NA error

  • If ‘TRUE’ or ‘1’ is specified for the approximate_match parameter, and no exact match is found, then the VLOOKUP function returns the next smaller value.

Vlookup approximate match

  • If ‘col_indexnum’ is less than 1 or is not recognized as a numeric value, then the VLOOKUP function returns ‘#VALUE!’ error.

Vlookup Value error

  • If the ‘range_lookup’ value is not recognized as a logical value, then it returns ‘#VALUE!’ error.
  • If ‘col_indexnum’ is greater than a number of columns in ‘table_array,’ then the VLOOKUP function returns ‘#REF!’ error.

Vlookup Ref Error

  • In case the argument ‘range_lookup’ is omitted, then the VLOOKUP function allows a non-exact match, but it will use an exact match if it exists.
  • VLOOKUP function is not case-sensitive.
  • If the lookup column contains duplicate values, then the VLOOKUP function will match only the first value.

Vlookup duplicate values

Recommended Articles

This has been a guide to VLOOKUP Tutorial in Excel. In this tutorial, we discuss the VLOOKUP function with its formula and how to use it with some practical examples and a downloadable excel template. You may learn more about excel from the following articles –

  • VLOOKUP with Text
  • Use Not Blank in SUMIF Function
  • VLOOKUP Formula in Excel
  • VLookup with Match
  • Confidence Interval In Excel
14 Shares
Share
Tweet
Share
All in One Excel VBA Bundle (35 Courses with Projects)
  • 35+ Courses
  • 120+ Hours
  • Full Lifetime Access
  • Certificate of Completion
LEARN MORE >>
Primary Sidebar
Footer
COMPANY
About
Reviews
Contact
Privacy
Terms of Service
RESOURCES
Blog
Free Courses
Free Tutorials
Investment Banking Tutorials
Financial Modeling Tutorials
Excel Tutorials
Accounting Tutorials
Financial Statement Analysis
COURSES
All Courses
Financial Analyst All in One Course
Investment Banking Course
Financial Modeling Course
Private Equity Course
Venture Capital Course
Excel All in One Course

Copyright © 2021. CFA Institute Does Not Endorse, Promote, Or Warrant The Accuracy Or Quality Of WallStreetMojo. CFA® And Chartered Financial Analyst® Are Registered Trademarks Owned By CFA Institute.
Return to top

WallStreetMojo

Free Excel Course

Excel functions, Formula, Charts, Formatting creating excel dashboard & others

* Please provide your correct email id. Login details for this Free course will be emailed to you

Book Your One Instructor : One Learner Free Class
Let’s Get Started
Please select the batch
Saturday - Sunday 9 am IST to 5 pm IST
Saturday - Sunday 9 am IST to 5 pm IST

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

WallStreetMojo

Free Excel Course

Excel functions, Formula, Charts, Formatting creating excel dashboard & others

* Please provide your correct email id. Login details for this Free course will be emailed to you

Login

Forgot Password?

WallStreetMojo

Download VLOOKUP Tutorial Excel Template

Special Offer - All in One Excel VBA Bundle (35 Courses with Projects) View More