Solved

Best way of checking that characters are not found in string

Posted on 2014-03-27
3
125 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

939 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now