Indexing

All functions use zero-based indexing in order to be consistent with Microsoft .NET Framework languages such as Visual Basic .NET and C#.  (Microsoft Excel uses one-based indexing).  This example returns all remaining characters from position 2 onwards of a zero-based index - “st”:

= SUBSTRING(“Test”, 2)

Position

0

1

2

3

String

T

e

s

t

This example returns two characters from position 5 onwards of a zero-based index - “Sp”:

= SUBSTRING(“Iron Speed Designer”, 5, 2)

Position

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

String

I

r

o

n

 

S

p

e

e

d

 

D

e

s

i

g

n

e

r

See Also

Variables Available in Formulas

Formula Evaluation Order

Indexing

Using Table and Record Control Functions in Formulas

Using .NET Framework Functions in Formulas

Using Custom Functions in Formulas

Formula Error Reporting