View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
mywebaccts (at) PLUGcomcast.net mywebaccts (at) PLUGcomcast.net is offline
external usenet poster
 
Posts: 3
Default How do I handle error conditions with the FIND command?

Thanks! Yeah, I knew the case sensitive difference, but I didn't think
of using isnumber.

Thanks again.


Dave Peterson wrote:

=if(isnumber(find(...)),"it's there","it's not there")

Just a reminder =find() is case sensitive. =Search() is not case sensitive.

"mywebaccts (at) PLUGcomcast.net" wrote:

I have a file of text strings in which some of the strings have a
substring I'm looking for, and others don't.

I tried using the FIND command to determine if the substring exists for
each text string, but when it doesn't ... I get #VALUE! returned.

I would have assumed that since FIND returns the index of the substring,
I would get something nice like "-1" returned when it's not there.

The problem is ... how do I manage the #VALUE! returns? I mean, is that
some kind of value I can test for? For instance, if I wanted to just
list the index of the substring, or write a "0" if it's not there, I
would try something like ...

=IF(FIND(substring,string,1)0,FIND(substring,st ring,1),0)

But of course, it doesn't work. Can anyone help me?

Thanks!
Jack