+ Reply to Thread
Results 1 to 10 of 10

Excel is truncating zeros in data set

  1. #1
    Registered User
    Join Date
    07-06-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    4

    Excel is truncating zeros in data set

    I have a set of data that contains 11 characters. When one of the characters is a letter, and I copy the data and I copy it from another source and paste it into a cell on a blank spreadsheet, the data entire 11 digit string remains intact. However, if the 11 character string is all numbers and the last two digits of that number are zeros, the data is changed into a scientific format number and the last two digits are removed from the cell.

    ex1: copied as (123456789D00) and pasted as (123456789D00) - Correct
    ex2: copied as (123456789900) and pasted as (1.234567899) - Incorrect

    How can I get Excel to stop doing this! 45% of these ID fields are numeric only and are therefore truncating. Doesn't matter if the data is copied from an Outlook email, Access 2007 or even word, once its pasted into Excel, it automatically defaults to this scientific Format
    Last edited by michonna1474; 07-06-2012 at 04:13 PM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Silly Question Thats Driving Me Nuts!

    Format the cells as Number with 0 decimal places
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Silly Question Thats Driving Me Nuts!

    The last two digits are still intact. Just change the format of the cell to a number format with zero decimal places.

    Also, please change the title of the thread. Excuse my humour, but you dont want silly people searching for nuts on the web to land up on the forum
    Life's a spreadsheet, Excel!
    Say thanks, Click *

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

    Re: Silly Question Thats Driving Me Nuts!

    Edit: OP responded to thread title change.
    Last edited by Cutter; 07-06-2012 at 05:24 PM.

  5. #5
    Registered User
    Join Date
    07-06-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Silly Question Thats Driving Me Nuts!

    OK, I changed the title.

    Format changes are not fixing the problem. I have already tried formating the cells as text, general, number with no decimals, etc. However, when I paste the data, it automatically converts back to scientific format. Has anyone else experienced this and have a work around. Also, the two zeros appear to be deleted as they do not display in the formula bar when I highlight the cell.

  6. #6
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Excel is truncating zeros in data set

    Pre-format the destination cells as 'number with no decimals' format.

    While pasting (presumably from and external source), use paste special --> unicode text.

  7. #7
    Registered User
    Join Date
    07-06-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Excel is truncating zeros in data set

    @Ace_XL I tried this and it pasted the data without the decimal. However, it still removed the 2 zero's at the end of my data set. I need the full 11 digit ID to be retained. So This suggestion gets me half way there, but I still need a way that retains my last two digits.

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

    Re: Excel is truncating zeros in data set

    Try preformatting the destination range as Text. Since some of the data has a letter in it then all of the data can be text, or is that a problem?

  9. #9
    Registered User
    Join Date
    07-06-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Excel is truncating zeros in data set

    @Cutter Yes they all can be formatted as text. I prefer text. But the preformat is being changed to scentific when the paste occurs. I am copying data in a spreadsheet forma from an email and pasting it directly into my excel spreadsheet.

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

    Re: Excel is truncating zeros in data set

    I copied from your original post and pasted into a cell and got the same SN result. But when I preformatted as text and pasted as "Match destination formatting" I got the correct result.
    The right click menu (in 2010 version) has 2 options for pasting - the one I mentioned above and "Keep source formatting". The keep source overrides the text formatting and produces the SN result.

+ 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