View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre
 
Posts: n/a
Default Find - Replace help help


Try this:

For text in A1

B1: =IF(COUNTIF(A1,"*-*"),LEFT(A1,FIND("-",A1)-1),A1)

If the text in A1 contains a dash (-), the formula takes the characters
to the left of the dash. Otherwise, it takes all of the text.

Does that help?

Regards,
Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=516304