?
Solved

Best way of checking that characters are not found in string

Posted on 2014-03-27
3
Medium Priority
?
132 Views
Last Modified: 2014-04-02
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
0
Comment
Question by:nutsch
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 43

Assisted Solution

by:Saqib Husain, Syed
Saqib Husain, Syed earned 800 total points
ID: 39959879
Try

=SUBSTITUTE(A1,"string","")<>A1
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 1200 total points
ID: 39959910
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
 
LVL 39

Author Closing Comment

by:nutsch
ID: 39973155
Thanks for your input, the isnumber does save a little typing over the not(iserr(.

Thomas.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article describes a serious pitfall that can happen when deleting shapes using VBA.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question