Understanding LOOKUP Formula Arguments in Excel 2013
The LOOKUP function in Excel 2013 is a powerful tool that allows you to search for a specific value in a range of cells and return a corresponding value from another range. The function has several arguments that can be used to customize its behavior. In this article, we will take a detailed look at each of these arguments and provide examples of how they can be used.
Syntax
LOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
Arguments
lookup_value: The value that you want to search for in the first column of the table array.table_array: A range of cells that contains the data you want to search. This range should include the value you are searching for in the first column and the return value in the last column.col_index_num: The column number in the table array from which the return value should be returned. For example, if the return value is in the third column of the table array, you would use a col\_index\_num of 3.[range_lookup]: An optional argument that specifies whether you want an exact match or an approximate match. If you set this argument to TRUE or omit it, an approximate match will be returned. If you set it to FALSE, an exact match will be returned.
Example
Let's say you have a table of data that contains information about products, including their product codes, descriptions, and prices. You want to use the LOOKUP function to find the price of a specific product based on its product code.
Here is the formula you would use:
=LOOKUP(A2, Master!A2:C100, 3)In this formula:
A2is the product code you are searching for.Master!A2:C100is the table array that contains the data you want to search.3is the column index number for the column that contains the prices.
The LOOKUP function will search for the product code in the first column of the table array and return the corresponding price from the third column.
Handling Errors
If the LOOKUP function is unable to find a match for the lookup value, it will return an #N/A error. To handle this, you can use the IFERROR function to specify a default value to return instead.
Here is an example:
=IFERROR(LOOKUP(A2, Master!A2:C100, 3), "Not found")In this formula, if the LOOKUP function is unable to find a match, it will return the text "Not found" instead of an error.
The LOOKUP function in Excel 2013 is a powerful tool that can be used to search for specific values in a range of cells and return corresponding values from another range. By understanding the arguments of the function, you can customize its behavior to suit your needs and avoid common errors.