Adding hyphen to text in cell
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
|