View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom Peo Sjoblom is offline
external usenet poster
 
Posts: 3,268
Default IF() with #VALUE

=IF(ISNUMBER(SEARCH(A1,B2)),"A","B")

--


Regards,


Peo Sjoblom




"avgrin" wrote in message
...
IF(search(A1, B2)0,A,B)
I'm searching for a string in A1 in the cell B2, if B2 contains A1,
search()
returns starting position of A1, and operation A is performed. However,
when
it is not there, #VALUE is returned. How do I get operation B?
Thank you