Lookup Formulas
VLOOKUP (Vertical Lookup):
- Syntax:
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]) - Example:
=VLOOKUP(A2, B2:D10, 2, FALSE) - Searches for a value in the leftmost column of a table and returns a value in the same row from a specified column.
- Syntax:
HLOOKUP (Horizontal Lookup):
- Syntax:
=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup]) - Example:
=HLOOKUP(B2, A1:D10, 3, FALSE) - Searches for a value in the top row of a table and returns a value in the same column from a specified row.
- Syntax:
LOOKUP:
- Syntax:
=LOOKUP(lookup_value, lookup_vector, [result_vector]) - Example:
=LOOKUP(A2, B2:B10, C2:C10) - Finds the closest (approximate) match in the lookup_vector and returns the corresponding value from the result_vector.
- Syntax:
INDEX and MATCH (Dynamic Lookup):
- Syntax:
=INDEX(return_range, MATCH(lookup_value, lookup_range, 0)) - Example:
=INDEX(C2:C10, MATCH(A2, B2:B10, 0)) - Combines INDEX and MATCH functions for more flexibility in lookup operations.
- Syntax:
XLOOKUP (Modern Lookup Function):
- Syntax:
=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode]) - Example:
=XLOOKUP(A2, B2:B10, C2:C10, "Not Found", 0, 1) - Performs a flexible and powerful lookup operation with various options.
- Syntax:
MATCH (Position of Lookup Value):
- Syntax:
=MATCH(lookup_value, lookup_array, [match_type]) - Example:
=MATCH(A2, B2:B10, 0) - Returns the relative position of an item in a range.
- Syntax:
CHOOSE (Value from a List):
- Syntax:
=CHOOSE(index_number, value1, value2, ...) - Example:
=CHOOSE(A2, "Apple", "Banana", "Orange") - Returns a value from a list based on an index number.
- Syntax:
Comments
Post a Comment