Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Find function: I want 0 if not found

Status
Not open for further replies.

MRyerson

MIS
Jan 20, 2003
25
0
0
US
I have a column that contains a long comment field.

I want a formula to tell me if a given set of characters exists in the comment field.

I don't care *where* the substring occurs, just does it occur, true or false.

Unfortunately the FIND function returns #VALUE! if the substring is not found.

Is there a way to "translate" the error value to a zero?
 
IF(ISERROR(<find statement>),0,1)



[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
The following would work.
=IF(ISERROR(FIND("text",A1)),0,FIND("text",A1))

Mike
 
Wow that was quick!

And, if had a bit more experience with Excel, I would have seen it.

Thanks!!

martyr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top