View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Alan Alan is offline
external usenet poster
 
Posts: 492
Default Adding hyphen to text in cell

That's good. If you want to make the result permanent, ie lose the formulas,
highlight the whole range, right click 'Copy', right click again, 'Paste
Special', check 'Values', OK.
You can then copy and paste the list to overwrite the original list. Best to
do this in a copy of the workbook.
Regards,
Alan.
"mePenny" wrote in message
...
Thank you Alan for your help. Worked out perfectly!

"Alan" wrote:

Change the formula to,

=LEFT(A1,2)&"-"&RIGHT(A1,(LEN(A1)-2))

You could enter where you want the hyphen in an adjacent cell, if you
enter
1 in B1

=LEFT(A1,B1)&"-"&RIGHT(A1,(LEN(A1)-B1))

will give you G-212DA, enter 2 and you have G2-12DA

Regards,
Alan.

But
"mePenny" wrote in message
...
My mistake.. not all need it after the first character. I also need
after
second:

example:
GA02004
Example:
GA-02004

"Alan" wrote:

Assuming you always want the hyphen after the first character,

=LEFT(A1,1)&"-"&RIGHT(A1,(LEN(A1)-1))

Regards,
Alan.
"Penny" wrote in message
...
I would like to add a hypen to the text that exists on the excel
sheet.
Is
there a formula for this?

example of text on sheet without hypen:
G212DA

text with hypen:
G-212DA