Spread.NET 17 Formula Reference
Formula Functions / Functions H to L / LOOKUP
In This Topic
    LOOKUP
    In This Topic

    This function searches for a value and returns a value from the same location in a second area.

    Syntax

    LOOKUP(lookupvalue,lookupvector,resultvector)

    LOOKUP(lookupvalue,lookuparray)

    Arguments

    Vector Form

    The arguments for the vector form are:

    Argument Description
    lookupvalue Value for which to search; can be number, text, logical value, or name or reference that refers to a value
    lookupvector Cell range that contains one row or one column; can be text, numbers, or a logical value; values need to be in ascending order
    resultvector Cell range that contains one row or column; must be the same size as lookupvector

    Array Form

    The arguments for the array form are:

    Argument Description
    lookupvalue Value for which to search; can be number, text, logical value, or name or reference that refers to a value
    lookuparray Range of cells that contains text, numbers, or logical values; values must be ascending order

    Remarks

    Vector Form

    The vector form of this function searches for a value from a range with a single row or column and returns a value from the same location in a second one row or one column range.

    In the vector form, if lookupvalue can not be found, it matches the largest value in lookupvector that is less than or equal to lookupvalue.

    Array Form

    The array form of this function searches in the first row or column of an array for the specified value and returns a value from the same location in the last row or column of the array.

    In the array form, if lookuparray has more columns than rows then the first row is searched. If lookuparray has more rows than columns then the first column is searched. The values in lookuparray must be in ascending order.

    Data Types

    Accepts numeric or string data. Returns numeric or string data.

    Examples

    LOOKUP(30,A1:A5,B1:B5)

    LOOKUP("A",{"a","b","c","d";1,2,3,5})

    Version Available

    This function is available in product version 2.0 or later.

    See Also

    HLOOKUP | VLOOKUP | Lookup Functions