Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Inserting a hyphen after the 3rd character
Hi All,
I am looking for a way to insert a hyphen (-) in a cell after the third character. For example, 123456789 turns into 123-456789. Any ideas? Thanks in advance!!! Jen |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Inserting a hyphen after the 3rd character
One way:
=LEFT(A1,3)&"-"&RIGHT(A1,LEN(A1)-3)) Hope this helps. Pete On Oct 29, 6:42*pm, wrote: Hi All, I am looking for a way to insert a hyphen (-) in a cell after the third character. For example, 123456789 turns into 123-456789. Any ideas? Thanks in advance!!! *Jen |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Inserting a hyphen after the 3rd character
Pete_UK wrote...
One way: =LEFT(A1,3)&"-"&RIGHT(A1,LEN(A1)-3)) .... Shorter, simpler, more efficient to use =REPLACE(A1,3,0,"-") |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Inserting a hyphen after the 3rd character
Harlan,
I think that you may have meant: =REPLACE(A1,4,0,"-") to insert the hyphen after the third character not the second. -- Regards, Sandy In Perth, the ancient capital of Scotland and the crowning place of kings Replace @mailinator.com with @tiscali.co.uk "Harlan Grove" wrote in message ... Pete_UK wrote... One way: =LEFT(A1,3)&"-"&RIGHT(A1,LEN(A1)-3)) ... Shorter, simpler, more efficient to use =REPLACE(A1,3,0,"-") |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Trying to use IF statement with hyphen | Excel Worksheet Functions | |||
Optional hyphen? | Excel Discussion (Misc queries) | |||
inserting special character in a cell as a macro | New Users to Excel | |||
...I want to display a hyphen instead of zero... | Excel Worksheet Functions | |||
sort cells with hyphen #####-###-#### | Excel Discussion (Misc queries) |