Solved

Best way of checking that characters are not found in string

Posted on 2014-03-27
3
127 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
3 Comments
 
LVL 43

Assisted Solution

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

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

Accepted Solution

by:
barry houdini earned 300 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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

809 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