INDEX Function

Returns the substring at the zero-based location index in the list delimited by delimiter. Or, if the index is out of range, returns an empty string or the optional token provided as the errorvalue argument.

Syntax

INDEX(index," list "[,[ delimiter ][,[ errorvalue ]]])

Parameters

Name Required/Optional Data Type Description
index
Required
Number
The location that you want to find.
list
Required
String
The list in which you want to search.
delimiter
Optional
String
The string to use as a delimiter within list. A delimiter string can be more than one character in length and include multibyte characters. The default is a semicolon.
errorvalue
Optional
Number
A user-specified value to return if the index is out of range. The default is an empty string.

Remarks

If the list begins or ends with a delimiter, a null string is assumed to exist before or after the list. Consecutive delimiters imply a null string in between.

If the index is out of range, Visio returns an empty string or the optional token provided as the errorvalue argument.

Example 1

INDEX(3,"cat;rat;;goat")

Returns "goat".

Example 2

INDEX(54,";1;2;3;",,"ERROR")

Returns "ERROR".