You can use the function VLOOKUP
to search for a specific target within a two-dimensional range and return the corresponding value in a specific column of the same row.
Here is the syntax of the VLOOKUP
function:
=VLOOKUP(search_key, range, index, [is_sorted])
search_key
is the value you want to search for.range
is the two-dimensional range in which you want to search for the value.index
is the column number (starting from 1) of the value you want to return in the same row where the search_key appears.is_sorted
(optional) is a boolean value that indicates whether the range is sorted in ascending order. If omitted, the default value is TRUE
, which means the function assumes the range is sorted.Here is an example of how to use the VLOOKUP
function to select a value in a row when a specific target appears within a two-dimensional range:
Assume you have a two-dimensional range A1:B5 that contains a list of names and their corresponding ages. You want to find the age of a specific person whose name is "John". Here are the steps:
=VLOOKUP("John", A1:B5, 2, FALSE)
Note that if the search_key is not found in the range, the function will return an #N/A error.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2021-06-17 11:00:00 +0000
Seen: 9 times
Last updated: Sep 03 '22
What is the method of applying a data filter specifically to the table range and not the entire row?
How can we manipulate the range of a string slice in the Golang template?
What is the problem with the index being out of range when creating a list?
What are icons that have graduated colors?
What are the steps to perform index match and maxifs functions in Google Sheets?
What is the VBA code to perform the Sumifs function?
How can the "list index out of range" error be resolved with the find_all method in Beautiful Soup?
Does the Google Text-To-Speech API consistently use a female voice when translating text?
What is the method for removing a specific y-axis range in a pointplot?