Best way of checking that characters are not found in string

Hi Experts,

Do you know a better way of checking that a string of characters is found in a string than the one I currently use, which is:

=not(iserr(find("string",a1)))

I find it relatively cumbersome.

Thanks,

Thomas
LVL 39
nutschAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
barry houdiniConnect With a Mentor Commented:
Hello Thomas,

Shorter to use ISNUMBER like this

=ISNUMBER(FIND("string",a1))

or you can use COUNTIF with wildcards if you don't care about case, i.e.

=COUNTIF(A1,"*string*")>0

....although you can't use that latter one if A1 is a number

regards, barry
0
 
Saqib Husain, SyedConnect With a Mentor EngineerCommented:
Try

=SUBSTITUTE(A1,"string","")<>A1
0
 
nutschAuthor Commented:
Thanks for your input, the isnumber does save a little typing over the not(iserr(.

Thomas.
0
All Courses

From novice to tech pro — start learning today.