Export (0) Print
Expand All
Expand Minimize

INDEX Function

Last modified: June 17, 2011

Applies to: Office 2013 | Visio 2013

In this article
Syntax
Remarks
Example 1
Example 2

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.

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.

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.

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

Returns "goat".

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

Returns "ERROR".

Show:
© 2014 Microsoft