How to Use the VLOOKUP Function in Excel

Updated on January 8, 2020
Joshua Crowder profile image

Joshua has work experience in manufacturing, distribution, and aerospace. He received his BBA in accounting from Kent State University.

The VLOOKUP Function

The VLOOKUP function is common and still considered a powerful tool for accountants so they can return data in spreadsheets.
The VLOOKUP function is common and still considered a powerful tool for accountants so they can return data in spreadsheets.

The Purpose of the VLOOKUP Function

The VLOOKUP function checks the column to the far left of a table for a value to return a value in the same row of a different specified column. This concept is further broken down in the following sections.

The VLOOKUP Function Syntax

The VLOOKUP function needs to be inputted like a formula for it to be able to work. To add a VLOOKUP formula to a cell, a cell needs to be clicked and "=VLOOKUP(" needs to be typed in. After the open parenthesis, this a specific syntax that need to be followed.

VLOOKUP (lookup_value, table_array, col_index_num, [range_lookup])

If the syntax is not followed and error may occur in the field where the formula was written. Each variable need for the VLOOKUP function is described more below.

The Vlookup Value

This indicates what record to abstract information from. The VLOOKUP function will always search the first column of a table for this value. The record that is chosen will contain data to be returned to the cell that the formula is typed in.

The Table Array

This lets the function know where all the data is. The whole table being used should be selected so that each record can be indexed. The VLOOKUP value will always be in the first column of the table so you may want to start this selection in column two if that is where the lookup value can be found.

The Column Index Number

The represents that column that that data to be returned is in. So, the lookup value determines the row and the column index determines the column. What is found when these meet will determine what data will appear in the cell.

The Range LOOKUP

This is the sensitivity measure and specifies whether the match needs to be approximate or exact. This range is optional and can be left out. Approximate and exact match settings are discussed in more detail below.

  • Approximate match - To return an approximate match the last input in the formula would need to be TRUE or 1. When this option is chosen the VLOOKUP function will assume that the first column (where the lookup value appears) is sorted alphabetically or numerically and will search for the closest approximate answer.
  • Exact match - To return the exact match the the last input in formula will need to be False or 0. This will ensure that the value being looked up will have make an exact match.


VLOOKUP Syntax Examples

=VLOOKUP("Amber",A1:B100,2,FALSE)

In this example amber will be looked for in the first column of a table. The section of the table used for the lookup is A1 to B100. The data that needs to be returned is in column two of the table. An exact match must be made.

=VLOOKUP(A2,A10:C20,2,TRUE)

In this example what ever value that is entered into cell A1 will become the lookup value. The section of the table used for the lookup is A10 to C20. The data that needs to be returned is in column two of the table. An approximate match must be made.

=VLOOKUP(A2,’Clients’!A:F,3)

In this example what ever value that is entered into cell A2 will become the lookup value. The section of the table used for the lookup is located in column A to F in the clients worksheet. The data that needs to be returned is in column three of the table.

Inserting a VLOOKUP Function

The VLOOKUP function can be inserted into a worksheet cell with the use of an insert tool. To insert the function one must first select a cell for the formula by clicking in it. Next, the formulas tab needs to be clicked, as well as the "Lookups & References" button on the Excel ribbon. The VLOOKUP option should be selected from the list.

To insert the LOOKUP function from the formula tab you must first navigate to: Formulas→Lookup & Reference→LOOKUP
To insert the LOOKUP function from the formula tab you must first navigate to: Formulas→Lookup & Reference→LOOKUP

The functions argument window will allow you to add variables to the function. The arrows to the right of each field can be click to find cell references or ranges.

There are dozens of ways that the VLOOKUP function can be used. Explore the following example if you want to know how this function is typically used in a form.

Example - Using VLOOKUP in a Form

The data in the illustration below shows accidental drug related deaths from 2012 to 2018. For the example, I would like to enter a record ID number in a field and have two pieces of data returned that are an attribute from that record.

This spreadsheet is contains records of accidental drug related deaths from 2012-2018.
This spreadsheet is contains records of accidental drug related deaths from 2012-2018.

The mock form that I will create will be in another worksheet in the same workbook. The ID Number will need to be an input to return data from the record for sex and cause of death.

The illustration below shows in detail of what was used to determine the value for sex. The lookup value is the value that that was entered in E10. That table used for the lookup was located in the range A1 to W891 in the worksheet titled "Accidental_Drug_Related_Deaths_." Next by entering 5, the sex was of the record was return for that column.

The cause of death data was similarly returned by using column 7 instead of column 5. Basically, if you want to return multiple data in different fields you can copy the same formula and change the column number depending on what piece of data that you want to appear.

To learn more about other types of lookup and reference function in Excel I recommend the following book. I have been using the Excel Bible for years to improve my understanding of all aspects of this Microsoft product.

The Excel 2019 Bible

References

Microsoft. (n.d.). VLOOKUP function. Retrieved January 5, 2020, from https://support.office.com/en-us/article/vlookup-function-0bbc8083-26fe-4963-8ab8-93a18ad188a1.

This content is accurate and true to the best of the author’s knowledge and is not meant to substitute for formal and individualized advice from a qualified professional.

© 2020 Joshua Crowder

Comments

    0 of 8192 characters used
    Post Comment

    No comments yet.

    working

    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, turbofuture.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: https://maven.io/company/pages/privacy

    Show Details
    Necessary
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
    Features
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Marketing
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Statistics
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)
    ClickscoThis is a data management platform studying reader behavior (Privacy Policy)