How can I add leading zeros between delimiters in Excel 2010
        Posted  
        
            by 
                Gregory Biernacki
            
        on Super User
        
        See other posts from Super User
        
            or by Gregory Biernacki
        
        
        
        Published on 2012-08-27T20:52:58Z
        Indexed on 
            2012/09/06
            21:42 UTC
        
        
        Read the original article
        Hit count: 383
        
microsoft-excel
|worksheet-function
I am trying to convert a list of property id numbers that has a standard format of 0000-A-00000-00-00, where my worksheet has the various combinations of
1-A-12310-B-1234
Ideally they would read as follows
0001-A-00123-0000-000010-B-01234-0000-00
I've tried using the custom number formatting but it doesn't like the letter in the middle of the number. I didn't know if my only option was to break them apart and then put them back together again.
I would accept a solution that merely put the leading zeros at the front of the number, (max is 4 characters) so the result could look like 0001-A-123
© Super User or respective owner