+ Reply to Thread
Results 1 to 10 of 10

Numbers automatically changed to scientific notation so can't get last digits

  1. #1
    Forum Contributor
    Join Date
    04-01-2010
    Location
    USA
    MS-Off Ver
    Office 2021
    Posts
    185

    Numbers automatically changed to scientific notation so can't get last digits

    I have large (about 20 digits) numbers in excel that have the little green triangle in the top left of each one and if you click on them it says number stored as text or preceded by an apostrophe. If I click on the number I noticed the 1st digit is blank.

    After clicking on the number and copying and pasting it or just highlighting the number and hitting enter it suddenly changes to scientific notation with the last 4 digits now zero. The numbers in excel are a code and I need all of them and I don't understand why this is happening.

    Once the number has been changed to scientific notation with the 0000 at the end how can I get the original number back?

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Numbers automatically changed to scientific notation so can't get last digits

    Excel stores numbers using a double precision datatype, which can handle up to about 15 digits. When you convert these numbers as text to real numbers, the digits beyond what double precision can store get lost. To my knowledge, there is no way to recover the lost digits, unless you have stored the numbers as text elsewhere.

    Wikipedia article with more than you want to know about how Excel stores and manipulates numbers: https://en.wikipedia.org/wiki/Numeri...icrosoft_Excel
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Valued Forum Contributor
    Join Date
    11-27-2011
    Location
    usa
    MS-Off Ver
    Excel 2007, Excel 365
    Posts
    495

    Re: Numbers automatically changed to scientific notation so can't get last digits

    @max3732, please explain in further detail what you are wanting to accomplish.

    Are you willing to use VBA code?
    Do you need the codes as 'numbers' or is text acceptable?
    What cells in the sheet is this going to involve?
    How is the data getting into those cells to begin with?
    Are the 'little green triangles' your only issue?

    Stuff like that will help us help you.

  4. #4
    Forum Contributor
    Join Date
    04-01-2010
    Location
    USA
    MS-Off Ver
    Office 2021
    Posts
    185

    Re: Numbers automatically changed to scientific notation so can't get last digits

    Yes I'd be willing to use VBA code if it would help.

    I can have the codes in any format as long as they're readable, although ideally I'd like to be able to copy and paste them if needed. This just involves a few cells. Like A3 to A30. I think the data was copied and pasted off a website, but I'm not sure. They all have a space in front of them.

    The only issue is the little green triangles on the top right of the cells and the yellow exclamation point when you click on them that gives the error I described previously. The big problem is they change to scientific notation with the last digits missing when I click on them and try to do anything with them. I have some already where the last digits are all zeros now

    All I'm trying to accomplish is being able to read the numbers that were originally entered into the sheet
    Last edited by AliGW; 12-15-2023 at 12:38 PM. Reason: Please do NOT quote unnecessarily! Use the QUICK REPLY button instead.

  5. #5
    Valued Forum Contributor
    Join Date
    08-31-2007
    Location
    SW Ireland
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2311 Build 16.0.17029.20068) 32-bit
    Posts
    523

    Re: Numbers automatically changed to scientific notation so can't get last digits

    First check if formatting the cells as Number doesn't do what you want.
    Excel 365 user. To unblock a downloaded macro-enabled workbook, go to your "Downloads" folder > right click on the workbook name > click 'Properties' > check the 'Unblock' checkbox. You can now open the workbook.

  6. #6
    Valued Forum Contributor
    Join Date
    11-27-2011
    Location
    usa
    MS-Off Ver
    Excel 2007, Excel 365
    Posts
    495

    Re: Numbers automatically changed to scientific notation so can't get last digits

    @max3732, can you provide a sample file, & sample result that you are looking for?

  7. #7
    Forum Contributor
    Join Date
    04-01-2010
    Location
    USA
    MS-Off Ver
    Office 2021
    Posts
    185

    Re: Numbers automatically changed to scientific notation so can't get last digits

    Sure. I have it attached here.Example numbers for excel forum 12.14.23.xlsx
    Last edited by AliGW; 12-15-2023 at 12:38 PM. Reason: Please do NOT quote unnecessarily! Use the QUICK REPLY button instead.

  8. #8
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Numbers automatically changed to scientific notation so can't get last digits

    If all 20 digits of these numbers are important, then, whatever you do, you will want to be sure that these are always stored as text and never stored as numbers. As I noted above, Excel uses double precision to store numbers, and double precision only retains about 15 significant digits.

    In your file, I selected A3:A6 and formatted as text @. Then I could double click or similar the values and they would stay as text. There is nothing in the file to tell me what the last five digits of A4 were, so I have no way to recover those digits.

    If I understand what is going on, the key is to never let these numbers stored as text be converted to numbers -- whatever you have to do to make sure that doesn't happen. I'd probably go so far as to suggest that you retain a text file backup just in case something happens to convert these text strings to numbers so you can recover the information.

    If the green triangle bothers you, go into Excel options where the "error checking options" are, and deselect the "numbers stored as text error" option.

    Does that help?

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,466

    Re: Numbers automatically changed to scientific notation so can't get last digits

    The values are 20 characters long and seen by Excel as Text. They are formatted as General but have a leading space. If you edit the cell and press Enter, it converts the value to a true numeric (by removing the leading space). Even if you refer to the cell with a simple formula, for example, =A3, it will convert the value to a number. But then it is too long to be represented as a number except using scientific notation.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  10. #10
    Forum Contributor
    Join Date
    04-01-2010
    Location
    USA
    MS-Off Ver
    Office 2021
    Posts
    185

    Re: Numbers automatically changed to scientific notation so can't get last digits

    @MrShorty

    Yes. I had no idea that excel would erase numbers that were entered by changing the format. I always thought formatting could be reversed, like when you see a date entered as the numbers behind it and you can go back and forth between them. Hopefully I have those numbers backed up somewhere else.

    @TMS

    That explains it. Just can't believe it would erase the numbers and limit the characters
    Last edited by AliGW; 12-15-2023 at 12:39 PM. Reason: Please do NOT quote unnecessarily! Use the QUICK REPLY button instead.

+ 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. Replies: 5
    Last Post: 09-08-2023, 01:58 AM
  2. Replies: 8
    Last Post: 11-23-2017, 01:45 AM
  3. Replies: 8
    Last Post: 08-05-2015, 02:36 PM
  4. Replies: 2
    Last Post: 11-13-2014, 12:00 PM
  5. Replies: 5
    Last Post: 09-12-2014, 04:10 PM
  6. Excel Tracking In Scientific Notation Numbers
    By Fredbugatti in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-23-2014, 01:14 AM
  7. Concatented Numbers Display as Scientific Notation
    By RWN in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-30-2005, 11:05 PM

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