Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2003
    Posts
    225

    Unanswered: add - to cell data

    i have a 10 digit value in my cell which i need to change to match the following:

    now

    1234567890

    required

    1-234-56-789-0

    with the dashes always being in after the:

    1st, 4th, 6th and 9th numbers

    please advise

  2. #2
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    Hi,

    If it is just for display purposes, format the cell with this custom type:
    #-###-##-###-#



    If you really need to have the hyphens within the value then you could use a formula such as:
    Code:
    =LEFT(A1)&"-"&MID(A1,2,3)&"-"&MID(A1,5,2)&"-"&MID(A1,7,3)&"-"&RIGHT(A1)
    Hope that helps...

  3. #3
    Join Date
    Mar 2003
    Posts
    225
    ok it's nearly there, with the above formula i get

    7-483-3-44-7

    from

    7483440017

    i am loosing a few digits


    I need

    7-483-44-001-7

    Any ideas?

  4. #4
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    The formula I posted works absolutely fine for me. Example attached.
    Attached Files Attached Files

  5. #5
    Join Date
    Mar 2003
    Posts
    225
    ok it seems to be a formatting issue, thanks for your help

Posting Permissions

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