View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
sbell sbell is offline
external usenet poster
 
Posts: 6
Default Delete everything after a certain character?

Chris,

In code you can use Instr(1, str1, str 2) to locate you character. And
inbed this in a Left(str 1, Instr()-1) to get your string.
Range("A2") = Left(Range("A1"), InStr(1, Range("A1"), "(") - 1)

hth
--
steveb
(Remove 'NoSpam' from email address if replying direct)
"Chris" wrote in message
...
Anyone have a formula or vb code that will delete everything from cell A1

after a certain character (ie "(" ) and populate cell B1 with what remains?

TIA
-Chris