Find a word and then take certain action, else

  • Thread starter Thread starter John Grossman
  • Start date Start date
J

John Grossman

I will have one of two statements - the first one might contain the word
"detail" and the second the word "ASIN". If the word "detail' is present
(i.e. http://www.xyz.com/exec/obidos/tg/detail/-/0934419345/ ) then execute
formula abc else execute formula efg.

Note sure how to handle verification of of "detail"
=if(find("detail",a6)="detail",abc,efg)
Tried this = but not working??
 
Hi!

You were real close. Try either of these:

=IF(ISNUMBER(SEARCH("detail",$A$6)),abc,efg)

=IF(ISERROR(SEARCH("detail",$A$6)),efg,abc)

These will also execute formula "efg" if the cell is
blank. If you don't want that to happen:

=IF($A$6="","",IF(ISNUMBER(SEARCH("detail",$A$6)),abc,efg))

=IF($A$6="","",IF(ISERROR(SEARCH("detail",$A$6)),efg,abc))

Biff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top