How to Use the VLOOKUP Function in Google Sheets
Google Sheets is a popular spreadsheet application that competitors like Microsoft Excel, owing primarily to its user-friendly interface and accessibility. One of the most commonly used functions in Google Sheets is VLOOKUP. It allows users to extract data from a large database or spreadsheet by looking up a value and returning the corresponding value in a specified column. In this article, we will explore an in-depth guide on how to use the VLOOKUP function in Google Sheets.
Step 1: Understanding the Syntax of VLOOKUP
Syntax is the format in which the function needs to be composed to get the desired output. Here is the Syntax of VLOOKUP:
=VLOOKUP( search_key, range, index, [is_sorted] )
Search_key: The value that you want to look up.
Range: The range of cells containing the data you want to search for the value in.
Index: The column number (starting from 1) in the range that contains the value you want to bring back.
Is_sorted: Optional. A logical value that specifies whether you want VLOOKUP to find an exact match or an approximate match. This parameter is set to either TRUE or FALSE.
Step 2: Determine the Lookup Value
The first step towards using VLOOKUP in Google Sheets is determining the lookup value. The lookup value is the data you want to extract from the database or spreadsheet. For instance, if you want to extract a specific product’s price from a database, the product’s name is considered the lookup value.
Step 3: Determine the Range of Cells
Determine the range of cells where the data you want to extract is located. This range includes the lookup value, as well as other data that contains the information you are searching for. You should ensure that the lookup value is in the leftmost column of the data range.
Step 4: Determine the Column number
Even though you have a range of cells containing the data you want to extract, you may still have to specify the exact column number where the data you want is located. In most cases, the column number will be in a range of columns next to the lookup column.
Step 5: Compose the Formula
Once you have the lookup value, range of cells, and column number, open a new cell in Google Sheets and start composing the formula. Place the cursor in the cell you want to add the formula and type in the VLOOKUP syntax. Ensure that you use the correct format of the syntax.
For instance, if you want to extract the price of a product named Orange from a range of cells (A2:B7) where product names are in Column A and Prices are in Column B, use the syntax as follows:
=VLOOKUP( “Orange”, A2:B7, 2, FALSE)
Here, the first parameter (search_key) is the product name “Orange,” the second parameter (range) is the range of cells containing the information you want to extract, the third parameter (index) is the column number where the price is located and the fourth parameter (is_sorted) is set to FALSE, meaning you want to find an exact match.
Step 6: Drag the Formula in Other Cells
After composing the formula in the first cell, drag the formula down the column to extract data from the range of cells.