#1
|
||||
|
||||
Insert hyphens between a string
Hi. I have a column with numbers typed as
3000100123 I need to add zero before the first character, insert a hyphen after the first char, and insert another hyphen after the fifth, like 03-0001-00123 What I did to get the desired result was to create 5 helper columns parsing the numbers then joining them all. At first I tried creating a formula but gave up. How should I do it with a formula? Thank you. |
#2
|
|||
|
|||
Like
Code:
=TEXT(A1,"00-0000-00000") |
#3
|
||||
|
||||
This simple? My experiments went to LEFT, RIGHT, LEN.... etc. This is the solution to my other problem of joining a data in percentage format with a text.
Thank you Arvi. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro to delete all words with hyphens? | pjs15 | Word VBA | 2 | 02-04-2020 10:45 PM |
search for string, wherever found, at end of line, insert 8 <cr>s | sbktex | Word VBA | 2 | 09-17-2014 04:09 PM |
Way to search for a string in text file, pull out everything until another string? | omahadivision | Excel Programming | 12 | 11-23-2013 12:10 PM |
Mask mode and hyphens | cyndor | Word | 6 | 07-25-2012 06:40 AM |
outlook task notes creates hyphens | abt | Outlook | 0 | 05-09-2009 03:51 PM |