Lookup Formulas

 

  1. 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.

  2. 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.

  3. 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.

  4. 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.
  5. 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.
  6. 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.
  7. 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.

Comments

Popular posts from this blog

Lila's Journey to Becoming a Data Scientist: Her Working Approach on the First Task

Notes on Hiring for Data Science Teams

switch functions