The LOOKUP function is similar to INDEXOF function and can be used to find the value at the specified index or location within an array. The return value index is zero based, i.e., the first value in the list is 0 (zero).


Syntax


LOOKUP([x,x,x,x,x], y)


Parameters


x = The array of values


y = The index position from which the user wishes to return the array value.


Data Type Returned


The type of data returned is the same as the array specified by the user.


Examples


LOOKUP([“Low”, “Med”, “High”], 2) will return the value of “High”


LOOKUP([1,2,3,4,5,6], 3) will return the value of 4.


LOOKUP([“Low”, “Med”, “High”], 3) will return an ERROR (not -1) as the index must be within the range of the array.