View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_1384_] Rick Rothstein \(MVP - VB\)[_1384_] is offline
external usenet poster
 
Posts: 1
Default Extracting text before ~ sign

Your subject says you want the text before the sign and your message says
the text after the sign; so, here is both...

Befo =LEFT(A1,FIND("~",A1&"~")-1)

After: =MID(A1,FIND("~",A1&"~")+1,999)

Rick


"jhong" wrote in message
...
Hi Everyone,


Please help me with your expertise. I have this type of data
(12345~Sample), that series is a code followed by the code name. Now I
want to get only the code after the ~ sign, my problem is the code is
not fix, some codes consist of 3 characters only so I cannot just use
the simple left(A1,#) formula.


Thanks in advance!


Jerome