Solved

Best way of checking that characters are not found in string

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
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…

856 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