ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Find a word and then take certain action, else (https://www.excelbanter.com/excel-worksheet-functions/8930-find-word-then-take-certain-action-else.html)

John Grossman

Find a word and then take certain action, else
 
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??



Biff

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)),e fg,abc))

Biff

-----Original Message-----
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??


.



All times are GMT +1. The time now is 03:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com