Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default Replace first hyphen in a cell

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.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Replace first hyphen in a cell

Why can't you just use Text - to column and select OTHER and put in the OTHER
box the dash?

"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.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,276
Default Replace first hyphen in a cell

Hi,
you don't need to replace the Hyphen to use text to columns just go to text
to columns,delimited, others

but if you want to replace it do

CTRL H
find what Hyphen, replace with

if this helps please click yes, thanks

"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.


  #4   Report Post  
Posted to microsoft.public.excel.misc
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.
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default Replace first hyphen in a cell

I could but then it would split the example below into three cells. I only
want two cells.

Make sense?

"Joel" wrote:

Why can't you just use Text - to column and select OTHER and put in the OTHER
box the dash?

"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.




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 320
Default Replace first hyphen in a cell

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

"Huber57" wrote in message
...
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.




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default Replace first hyphen in a cell

As I re-read my first post, I don't think i was clear.

I have a column of cells. In that column, there is a manf. name and manf.
part number separated by a hyphen. I would like to split them out using text
to columns. Unfortunately, the manf. number could also have a hyphen. My
thought was to replace the hyphen that divides the two with another character
I know is not in the manf part number.

Does that help?

"Eduardo" wrote:

Hi,
you don't need to replace the Hyphen to use text to columns just go to text
to columns,delimited, others

but if you want to replace it do

CTRL H
find what Hyphen, replace with

if this helps please click yes, thanks

"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.


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Replace first hyphen in a cell

With your data in cell A1 try the below to remove the first hyphen

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

If this post helps click Yes
---------------
Jacob Skaria


"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.


  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default Replace first hyphen in a cell

Perfect. Thanks much!



"Bob Umlas" wrote:

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

"Huber57" wrote in message
...
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.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding hyphen to text in cell Penny[_2_] Excel Discussion (Misc queries) 6 March 25th 09 02:08 AM
Cell format - put hyphen where zero value would be. sheana New Users to Excel 2 February 1st 08 06:20 PM
hyphen (nit minus) in cell Appalachia Excel Discussion (Misc queries) 3 September 19th 07 01:39 PM
Entering a hyphen into a cell Goodwin Excel Worksheet Functions 1 March 30th 06 10:42 PM
many numbers in one cell separated by hyphen. baju Excel Discussion (Misc queries) 6 February 9th 05 02:15 PM


All times are GMT +1. The time now is 09:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"