+ Reply to Thread
Results 1 to 9 of 9

Problem with concatenation taking away zeros

  1. #1
    Registered User
    Join Date
    08-21-2012
    Location
    Cape Town
    MS-Off Ver
    Excel 2010
    Posts
    4

    Question Problem with concatenation taking away zeros

    When I can Concatenate numbers like 0001234 and 0005678 the result I get is 12345678 instead of 00012340005678, how do I get around this problem. I need the zeros to be included in the result.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699

    Re: Problem with concatenation taking away zeros

    Are they always 7 digits (with the zeroes)? Try using TEXT function, e.g. with numbers in A2 and B2

    =TEXT(A2,"0000000")&TEXT(B2,"0000000")
    Audere est facere

  3. #3
    Registered User
    Join Date
    08-21-2012
    Location
    Cape Town
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Problem with concatenation taking away zeros

    Here is an example of what i am talking about. The number sequences are all different lengths. Is these a way to do this?
    Attached Files Attached Files

  4. #4
    Forum Contributor CheshireCat's Avatar
    Join Date
    10-11-2011
    Location
    Victoria, Canada
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    258

    Re: Problem with concatenation taking away zeros

    You could use ddl's suggestion and use the same rules you set in your formatting:

    Please Login or Register  to view this content.
    Docendo discimus.

  5. #5
    Registered User
    Join Date
    08-21-2012
    Location
    Cape Town
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Problem with concatenation taking away zeros

    Sorry I am I understand the logic, bur where do I insert this formatting. I have to do this every month, is there a way to write a Macro??

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Problem with concatenation taking away zeros

    You can drag the formula down.

    See the example.
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  7. #7
    Registered User
    Join Date
    08-21-2012
    Location
    Cape Town
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Problem with concatenation taking away zeros

    Thanks everyone and also Oeldere for the example you are stars!!!!!

  8. #8
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Problem with concatenation taking away zeros

    Glad I could help. Thanks for the reply.
    If the question is solved, will you mark your question as solved?
    If you have (other) questions, on this item, just ask.

  9. #9
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Problem with concatenation taking away zeros

    @ AndyRG

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1