+ Reply to Thread
Results 1 to 7 of 7

Merging Number fields together with leading zeros

  1. #1
    Registered User
    Join Date
    06-24-2014
    Location
    Ontario, CA
    MS-Off Ver
    2010
    Posts
    45

    Post Merging Number fields together with leading zeros

    Okay I have a large excel file that I did not create which we are extracting info form. I need to merge 3 number columns together to produce a combined result. Such as 2007 + 001 + 024 = 2007001024
    I tried converting to text but then I lose the leading zeros and I am back where I started. The 3 number columns are actually custom with a format of 0000 000 000.
    Is there a way to merge without converting anything to text since the combined number result is actually an identifier for something else? (The numbers range in each column meaning sometimes it can be 3427 989 123 or 1002 001 002) I tried using =CONCATENATE(A1,B1,C1) and =A2&B2&C2 but I still don't the result I need.
    Last edited by alcorp; 06-26-2014 at 02:14 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: Merging Number fields together with leading zeros

    Can you upload a sample?
    ________________________________________________________
    If your problem is solved, update the thread as SOLVED: Go to the top of the first post-Select Thread Tools-Select Mark thread as Solved OR - Go to the first post - Click edit- Click Advance- Just below the word "Title:" you will see a dropdown with the word No prefix.- Change to Solve- Click Save.

    Show your gratitude to the person who helped you solving your problem by clicking on star button at the bottom of such post.

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Merging Number fields together with leading zeros

    With these values in A1:C1
    2004 001 024

    This regular formula concatenates them:
    Please Login or Register  to view this content.
    In that example, the formula returns: 2007001024

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Merging Number fields together with leading zeros

    Maybe something like this?

    =A1&TEXT(B1,"000")&TEXT(C1,"000")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    06-24-2014
    Location
    Ontario, CA
    MS-Off Ver
    2010
    Posts
    45

    Re: Merging Number fields together with leading zeros

    Thanks I was able to use a version of your excel formula!

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Merging Number fields together with leading zeros

    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. 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 relatively 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.

  7. #7
    Registered User
    Join Date
    06-24-2014
    Location
    Ontario, CA
    MS-Off Ver
    2010
    Posts
    45

    Re: Merging Number fields together with leading zeros

    F.Y.I I also found this to help too, as a helper column For leading zeros to combine with text and not lose the zeros =TEXT(B2,"000")

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Formatting a Number with leading zeros
    By btamulis in forum Excel General
    Replies: 7
    Last Post: 02-11-2012, 12:09 PM
  2. Add varying number of leading zeros
    By santaklawze in forum Excel General
    Replies: 2
    Last Post: 09-29-2010, 10:47 AM
  3. Leading Zeros To Specific Fields
    By acedie in forum Excel General
    Replies: 4
    Last Post: 07-10-2008, 03:19 AM
  4. [SOLVED] removing leading zeros in numeric fields
    By dingy101 in forum Excel General
    Replies: 3
    Last Post: 11-20-2005, 11:50 PM
  5. Spliting a number with leading zeros
    By haitch2 in forum Excel General
    Replies: 7
    Last Post: 09-29-2005, 07:09 PM

Tags for this Thread

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