+ Reply to Thread
Results 1 to 7 of 7

Losing leading zeros when copied to another sheet

  1. #1
    Registered User
    Join Date
    06-04-2014
    Location
    Newcastle, Australia
    MS-Off Ver
    2010
    Posts
    63

    Losing leading zeros when copied to another sheet

    Hi all

    The attached worksheet works well except for one issue I'm hoping someone may be able to help me with.

    The Equipment List worksheet contains parts for each individual piece of equipment, and the Parts List worksheet has the parts list for the entire job, all consolidated in one place for ordering.

    My problem is that the Weidmuller parts have a 10 digit number with leading zeros (eg row 45 - 0474560000), which I need to keep.

    When the worksheet is updated, when copied to the second sheet (Parts List), the leading zeroes are lost (eg row 19 - 474560000 which should be 0474560000).

    Could one of you fine folk please take a quick look at it for me?

    Many thanks, Robbo
    Attached Files Attached Files

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Losing leading zeros when copied to another sheet

    Format the sheet as text and it should work fine.
    HTH
    Regards, Jeff

  3. #3
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Losing leading zeros when copied to another sheet

    your not actually copying the range across but replicating it
    as such you lose that text formatting you have
    Please Login or Register  to view this content.
    ps you have a table in parts list worksheet which is causing some issues
    maybe get rid of it if your not using it
    Attached Files Attached Files
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Registered User
    Join Date
    06-04-2014
    Location
    Newcastle, Australia
    MS-Off Ver
    2010
    Posts
    63

    Re: Losing leading zeros when copied to another sheet

    Thanks Jeff, I tried that but the formatting is lost when updating replicating for the parts list.

    Thanks Humdingaling, works fine now.

    Much appreciated.

  5. #5
    Registered User
    Join Date
    06-04-2014
    Location
    Newcastle, Australia
    MS-Off Ver
    2010
    Posts
    63

    Re: Losing leading zeros when copied to another sheet

    I've just come across a problem with the spreadsheet as attached by Humdingaling above.

    If I update the Equipment List worksheet, the UPDATE button on the Parts List worksheet no longer works.

    Any advice would be appreciated.

    Robbo

  6. #6
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Losing leading zeros when copied to another sheet

    change clearcontents back to your entirerow.delete

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-04-2014
    Location
    Newcastle, Australia
    MS-Off Ver
    2010
    Posts
    63

    Re: Losing leading zeros when copied to another sheet

    Perfect, thanks you.

    Robbo

+ 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. Cannot open csv file without losing leading zeros for mobile phone numbers
    By forrestgump1980 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-26-2016, 09:15 AM
  2. losing leading zeros in excel sheet cells
    By bizdanny in forum Excel General
    Replies: 2
    Last Post: 01-15-2016, 12:19 AM
  3. [SOLVED] Losing the leading zeros from a textbox on a userform.
    By TG58 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-20-2015, 12:01 PM
  4. [SOLVED] Changing 5-digit Zip to 3-digit zip without losing leading zeros
    By Jennifer C in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-05-2014, 09:26 AM
  5. Copy custom format without losing leading zeros
    By ucyzgba in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-14-2013, 09:47 AM
  6. [SOLVED] Losing Leading Zeros
    By timbo1957 in forum Excel General
    Replies: 7
    Last Post: 07-27-2012, 09:25 AM
  7. Replies: 0
    Last Post: 08-11-2011, 12:47 AM

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