How to Use VLOOKUP in Google Sheets (With Examples)

How to Use VLOOKUP in Google Sheets

VLOOKUP (Vertical Lookup) is a function in Google Sheets that allows you to search for a value in one column and return a value from another. For example, you can use the VLOOKUP function to search for a product by its product ID and return the product name.

This guide shows you how to use the VLOOKUP in Google Sheets.

VLOOKUP Syntax

=VLOOKUP(search_key, range, index, [is_sorted])

Arguments

  • search_key: value you want to search for in the first column of the selected range
  • range: range of cells you want to search for. The search key must be in the first column of the search range.
  • index: column’s index from which you want to return a value. The index must be a positive integer. The return column must be to the right of the search key column.
  • is_sorted (optional): Specifies how the search key should match the values in the search range. The default match type is FALSE, meaning the search key must be an exact match. It is optional.

Examples of Using VLOOKUP in Google Sheets

Example 1

In this scenario, we have a list of Product Names and their corresponding Product ID. We can quickly pull the Product Name from the list using the unique Product ID.

For example, we want to extract the corresponding Product Name of the Product ID (P-5).

Vlookup Example
List of Product Names and their corresponding Product ID.

Follow the below steps:

  1. Type the following formula followed by an opening parentheses in the cell where you want the output:
    =VLOOKUP(

    Vlookup Formula
    Type “=Vlookup(” to initiate the function.

  2. Select the cell containing the value you want to search for, followed by a comma. In our example, we will select cell C11.

    Search Key Argument
    Insert the lookup value in the formula.

  3. Select the range of cells where you want the function to search the value. In our example, we will select the cell range A3 to C8. Next, enter a comma.

    Search Range
    Insert the search range in the formula.

  4. Enter the column’s index that you want to return a value. In our example, we want the Product Name, which has an index of 2.
    Index
    Insert the column index in the formula.

    Close the parentheses and hit Enter. You’ll find the Product Name corresponding to the Product ID.

    Vlookup Output
    VLOOKUP returns the corresponding value of the search key from the search range.

Example 2

In this scenario, we will use the “Product Info” from the previous example in one sheet and a “Customer Info” table in a new sheet.

Product Info Sheet
Data set of products’ information.
Customer Info Sheet
Data set of customers’ information.

In our example, we want to extract the Product Name corresponding to the Product ID from the Product Info sheet and display them in the Customer Info sheet. Follow the below steps:

    1. Select the cell where you want to return the lookup value.

      Select a cell
      Select your cell for the output.

    2. Type the following formula followed by opening parentheses:
      =VLOOKUP(
    3. Select the cell containing the value you want to search for, followed by a comma. In our example, we will select D5, which corresponds to Product ID P-3.

      Search key
      Specify the search value.

    4. Open the Product ID sheet. Then, select the range of cells where you want the function to search the value. In our example, we will select the cell range B5 to C9. Next, enter a comma in your formula.

      Search range
      Specify the search range.

    5. Press F4 to lock the selected cell range. It will ensure that the reference does not change when copying the formulas.

      Lock Cell Range
      Press F4 to freeze references.

    6. Enter the column’s index that you want to return a value. In our example, we want the Product Name, which has an index of 2.

      Column Index
      Insert the column index.

    7. Press Enter. You will notice the Product Name corresponding to the Product ID.

      Returned value
      Vlookup returned the searched value.

    8. Select the cell with the formula and hover the cursor over the bottom of the cell. Then, click and drag the fill handle downwards to fill the rest of the cells.

      Lookup Values
      Drag the fill handle to copy the formula.

Phoebe is an HR assistant in her day job, but is also a web blogger that loves writing guides and sharing her experiences. When she is not out with her friends, she enjoys traveling or binge-watching Netflix. She graduated with a BA in Communication and Media Studies from the University of Utah, and is a chief editor at TechObservatory.

Leave a Comment