Joshua earned an MBA from USF and writes mostly about software and technology.
Whether you are using Sheets, Excel, or other spreadsheet programs, the VLOOKUP formula is a very powerful tool. It can be used to reference valves in a table based on a common value of a record. The syntax of the formula can be seen below in bold followed by an explanation of each part of the formula.
=VLOOKUP(search_key, range, index, [is_sorted])
- search_key: The value to search that is being searched.
- range: The range where the search key is being searched.
- index: The column of the value to be returned.
- is_sorted: Optional :
- FALSE = Exact match. Use it when you are looking for a specific value.
- TRUE = Approximate match. Usually used with numerical value so the closest match can be selected.
Value Lookup Example
In the example below, we’ll see how to VLOOKUP works with simplicity. I set up an input for the country code and I want the VLOOKUP formula to return the country name with that given country code.
The search key will be the value that is being looked up. This will be cell C2 where the lookup or key value will be entered.
Next, the range needs to be selected. The range will contain all possible lookup values and the values that will be returned by the function.
The next piece of information needed is the index. Since there are only two columns in this range the index will be number 2 since that is where the country name is the value that I want to be returned. When indexing the formula only considers the columns in the range and counts columns from left to right.
The last piece of information needed is the sorted section. Since we want to match the country code exactly I want to use an exact match.
At first, I received an error because there is now country to look up yet.
After adding a country code the VLOOKUP formula is working because the related county was returned in the cell where the formula was inputted.
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.
© 2022 Joshua Crowder