In Function

Searches for the result of an expression within a list of values. It returns True if one of the values matches the passed expression, otherwise False is returned.

In ( expr, value1 [ , value2 [ , … value-n ] ] )

Parameters

Expr  -  (Input, expression, Required)

Specifies the expression to search for. If expr is Error, the search is not performed and the result is Error.

value-n  -  (Input, expression, At least one required)

Specifies a set of values to search for. If the value is Error, the search is terminated and the result is Error.

Return Value

True if a matching value was found otherwise False. Error is returned if expr or any of the values are equal to Error.

Examples  

In (1, 1, 2, 3)

Returns True

In (1, 2, 3, 4)

Returns False

In (“bbb”, “aaa”, “bbb”, “ccc”)

Returns True

In (Null, 1, “aaa”, Null)

Returns True

In (Error, 1, “aaa”, Null)

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.