Skip to main content

INSTR

Searches for the first position in a string of another string, this returns the location of a string within another string and 0 if it cannot be found.

Syntax

int INSTR(string searchText, string value)

Inputs

ObjectData TypeDescription
searchTextStringThe string to find.
valueStringThe string to find it in.

Example

INSTR("S","Simego")

Will return "1".

or

INSTR("Sync", "Data Synchronisation Studio")

Will return "6" as "Sync" begins at the sixth position in the string.

You can use this with your column data by passing in the column names. For example if you had a column titled ProductName and you wanted to lookup where product names had the word tea in them you could use the following:

INSTR("tea", ProductName)

If "tea" does not exist in the product name then 0 is returned.