lookuplist
lookuplist(valuelist
,index
)
The LOOKUPLIST function has the following argument:
valuelist
The list of values that are options that can be returned.
index
The index number of the item in the list to be returned.
This function extracts a value from a list. The list argument may either be a list data type or it may be a string that will automatically be split at commas in to a string list.
The index paramters specifies the position of the item in the list. List positions are numbered starting at zero.
If the list is empty or the index is greater than the number of items in the list then an error will occur.
Formula |
Description |
Result |
---|---|---|
lookuplist('1,2,3,a,b,c', 0) |
Split the first argument into a list of string values, and return the item at position 0 (the first item). |
'1' |
lookuplist(list(1,2,3),0) |
Return the first value from a list of integers. |
1 |
int(lookuplist(list('1,2,3'),0)) |
Return a value from a string list as an integer |
1 |