View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Joe User[_2_] Joe User[_2_] is offline
external usenet poster
 
Posts: 905
Default Find and IF statement

"Atif" wrote:
=IF(SEARCH("BCOT",A2)0,"BCOT",IF(SEARCH("BCPN",A2 )0,"BCPN",""))


Try:

=IF(ISNUMBER(SEARCH("BCOT",A2)),"BCOT",IF(ISNUMBER (SEARCH("BCPN",A2)),"BCPN",""))


----- original message -----

"Atif" wrote in message
...
Hi:

I am using following formula to search a string and display in target
cell,
if first IF condition returns TRUE it displays BCOT, if not #value! error.
any help.

=IF(SEARCH("BCOT",A2)0,"BCOT",IF(SEARCH("BCPN",A2 )0,"BCPN",""))