Lookup Function

Returns an indexed description from value/description list.

Lookup ( value, list)

Parameters

value  -  (Input, expression, Required)

Specifies the value associated with the description to return. If value is not matched in one of the value/description pairs, then the result is Error.

list  -  (Input, expression, Required)

Specifies one or more semi-colon-delimited value/description pairs. All of these pairs are listed in a single String expression.

Return Value

The description of the nth expression, indexed by the index parameter.

Examples

Lookup ("A", "A=Option1;B=Option2")

Returns "Option1".

Lookup ("B", "A=Option1;B=Option2")

Returns "Option2".

Lookup ("C", "A=Option1;B=Option2")

Returns Error.

TIP:

Functions are specifically for use in the Macro Editor. Refer to Microsoft's official VB and JScript documentation for scripting equivalents.

See Also

Functions | Choose function | Description function | Iff function | In function | Lookup function | Switch function | Value function


© 2004-2021 looksoftware. All rights reserved.