Solved

How to Stop Auto Format of Scientific Notation

Posted on 2010-09-03
8
1,227 Views
Last Modified: 2012-05-10
Hi,
I periodically exporting csv file from one of our system. But when the numbers are downloaded the numbers are automatically converted to scientific notation and when perform a change format to "Numbers" with out decimal the numbers changes completely to a different number. Is there a fix for this or a code for this?

Thanks
ScientificNotation.JPG
0
Comment
Question by:justmiracle78
8 Comments
 
LVL 24

Assisted Solution

by:broomee9
broomee9 earned 150 total points
Comment Utility
>>when perform a change format to "Numbers" with out decimal the numbers changes completely to a different number.

I did this with your three numbers above and it worked fine.

See attached.

Book1.xls
0
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 350 total points
Comment Utility
justmiracle78,Excel has a maximum precision of 15 digits, so if you have an entry that "looks" numeric but which has >15 significant digits, you will suffer a loss of precision.  For example, the number:1234567890.123456will become:1234567890.12345and the number:1234567890123456will become:1234567890123450 (and likely display in scientific notation as 1.23457E+15 or similar)The only thing you can do is to try to import such values as text and not as numbers.Patrick
0
 
LVL 92

Expert Comment

by:Patrick Matthews
Comment Utility
justmiracle78,BTW, there is no "conversion to scientific notation" going on here.  That is simply a number format applied to how the value is displayed, and has no effect on how Excel actually stores the number, or uses it in calculations.Patrick
0
 
LVL 92

Expert Comment

by:Patrick Matthews
Comment Utility
justmiracle78,So, as above, the value you are importing, 2010041400081989, appears to be numeric, so Excel treats it like a number.  However, it has 16 significant digits, one more than Excel's limit.  Excel thus truncates the precision (but not the scale), and changes the value to 2010041400081980.Patrick
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:justmiracle78
Comment Utility
broomee9 - I actually did what you recommended and have changed the format to numbers but when it converts it does not return the correct number. The ending numbers changes to "0" zeros.

Patrick, I was hoping there was a solution for this but before posting this question I did a search on this problem and everyone has been saying the samething what you've said. I guess we'll request a change request to add an apostrophe in front of the numbers so it doesn't automatically change the numbers into scientific notations.

Thanks
0
 
LVL 18

Expert Comment

by:WarCrimes
Comment Utility
I run into this constantly when bringing text files into Excel that were output by SAS.  As Patrick suggested, use Text format.  You don't need to prefix with an apostrophe, just change the format of the Transaction Ref. column to Text before importing the data (or during the import if that is an option such as with VBA code).
0
 
LVL 18

Expert Comment

by:WarCrimes
Comment Utility
Perfect example.

Column C was formatted to Text before Import, while Column O was not.  No need for apostrophe.

WC
example.xls
0
 
LVL 18

Expert Comment

by:WarCrimes
Comment Utility
Just in case, here is what I pasted into Excel, using Text To Columns to parse the PIPE delimiter.


178|0|1516665276843964||N|20100217|000001|20100302|92.2||||||24142010060900019751532||5812|11367|FLUSHING|NY|US|APRV|SWIPED|1||OTH|OTH|||||||||0||||1516665276843964||20100302|0|0|0|0|0|0|0|0|0|0|||||||||||||||

178|0|1516665276843964||N|20100222|000001|20100224|22.32||||||24412900054980001082891||5814|11367|FLUSHING|NY|US|APRV|SWIPED|1||OTH|OTH|||||||||0||||1516665276843964||20100224|0|0|0|0|0|0|0|0|0|0|||||||||||||||

Open in new window

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now