INDEXOF function

The Klipfolio INDEXOF function returns a vector of data containing the first index position of 'search text'. If occurrence is provided, the first index position of that occurrence is returned.

The syntax for the INDEXOF function is:

INDEXOF(text, search text , occurrence)


text the data set vector
search text the text you want to find scalar
occurrence the index position you want to return scalar

INDEXOF example

Let's look at a INDEXOF function example.



1 4/24/2012

The following example is based on the above text from an Excel spreadsheet:

SUBSTRING( A1 , ( INDEXOF( A1 , "/" , 2 ) + 1 ) , to ) 

-> [2012]

Related links: