Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Dec 2002
    Posts
    192
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Keep the starting 0's

    Hi I have a database A1=00 A2=66 A3=08-- what I need it to look like is 00-66-08 or 006608 with the 0 before the 0 in A1 and the 0 before the 8 in A3. How, How, How can this be done????

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,433
    Thanks
    371
    Thanked 1,456 Times in 1,325 Posts
    Buckshot,

    You need to create a custom format using the number of leading zeros you want. see attached graphic.
    Attached Images Attached Images
    Last edited by RetiredGeek; 2011-07-28 at 17:35.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  3. #3
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    If you want to join them in another cell:
    =text(A1,"00")&TEXT(A2,"00")&TEXT(A3,"00")
    for example.
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •