Functions Language

IndexOf

The IndexOf() function locates one text string within another and returns the position of the located text (the position is zero-based, i.e. the first position is 0).

Note:

IndexOf() is an old function that is interchangeable with the Excel Find() function. Find() should be used in place of IndexOf().

Syntax


IndexOf (MainText, FindText)

MainText The input string to evaluate
FindText The text to locate

Examples


Function Output
IndexOf(“Company: ABC Retirement Fund”,”ABC”) 9
IndexOf(“Company: ABC Retirement Fund”,”XYZ”) -1
IndexOf(“Company: ABC Retirement Fund”,” “) 8
IndexOf(“Company: ABC Retirement Fund”,”Company”) 0