Find a string

You need to browse the data to see if a certain string like exists “ab” in cells.

This can be done with FIND function. The arguments are what to find, in this case “ab”. The second argument is where to find, in the cell C3.

If the function finds the string, the formula return the running number where the string starts in the cell. The value in B5 is sdab, the “ab” starts in the 3rd digit.

If the FIND formula does not return any value, the result is #VALUE, which is not very user friendly.

ISERROR formula defines whether the FIND returns a usable value or not.

Combine the two formulas.

We need to write an IF statement, if FIND formula returns an error, then IF return blank cell. If IF does return an error but the number where ab starts, then IF return “ab is here”.

Now the results are easily readable.

The sentence is here =IF(ISERROR(FIND($C$2;B4));””;”ab is here”) for copy pasting.