The Klipfolio LASTINDEXOF function returns a vector of data containing the first index position of the last occurrence of 'search text'. If occurrence is provided, the first index position of that occurrence starting from the end of the data is returned.
The syntax for the LASTINDEXOF function is:
LASTINDEXOF (text, search text , occurrence)
|text||the data set||vector|
|search text||the text you want to find||scalar|
|occurrence||Optional. The first index position you want to return||scalar|
Let's look at a LASTINDEXOF function example.
The following example is based on the above text from an Excel spreadsheet:
SUBSTRING( A:A , ( LASTINDEXOF( A:A , "/" ) + 1 ) , to )
Note: To remove the /, you must select LASTINDEXOF in the formula and then proceed as follows:
- Select the Wrap current value in parenthesis button.
- Select ... , then the + mathematical operator.
- Select the Insert literal string or number button and type 1.