View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Commish Commish is offline
external usenet poster
 
Posts: 14
Default Replace first hyphen in a cell

On Jun 3, 1:38*pm, Huber57 wrote:
All:

I have searched the posts and on Google but I can't find the answer.

I have a cell:

Kemet - ECJ-1238FG47KGCH1

I want to replace only the first hyphen in the cell with a | so I can use
Text to Columns.

Is there a better way?

Thanks much.


Have you tried the SUBSTITUTE function?

=SUBSTITUTE(A1,"-","X",1)

Assuming the text string that you posted above is in cell A1, and you
want to replace the hypen with an X, that will work.