Exporting Results to Another System and Significant Figures (Rounding)

BAlGaInTl

Well-known Member
Joined
May 7, 2003
Messages
1,082
Ok,

It's been a while since I've been on the boards. When I was more active, we had a rousing discussion on Significant Figures:

http://www.mrexcel.com/forum/excel-questions/64212-significant-figures-problem.html

Interestingly enough, I've seen the solution that we came up with here trickle through the scientific community. We often find ourselves bending Excel to our scientific needs rather than the mathematical ones.

Today, I discovered a new fun problem. I have a spreadsheet that performs the following calculation

A-(B*1000)

This is a spreadsheet that users fill out as they are performing work. It is then transferred to another database system using an automated process that I have written. Everything works great except for.... You guessed it... significant figures.

Take the following example:

13.170-(0.1310*1000) = 0.07000

That is all fine and dandy. But when I export the data in to another system, the data that goes forward is

0.0699999999999985

I'm 99% sure that it has to do with the precision of the numbers used in the calculations performed by Excel.

We try to capture as many decimal places as possible in the second system that data is transfered to even though they may not be "significant" (see previous post if you have a burning desire to understand that :) ).

So my question is... short of rounding the values prior to the transfer, is there any other fix for this?

If I round, what is the proper number decimal places to round to? Is it constant? Or does it depend on the number?

Finally, I (mostly) understand why this is happening... and our reports that are going out to the customer are correct (rounded to the proper number of significant figures). How do I explain to my bosses the "why" of this occurance?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Any thoughts on this one?

I'm pretty sure I'm giong to add a round statement to my last formula in the spreadsheet.
 
Upvote 0
Hi,

Search for Floating Point Precision in Google. This applies to many apps, not just Excel. Basically some numbers cannot be represented exactly in Binary & so lead to the result you are seeing.

Normally the solution is the one you have already come to of Rounding.

Hope this helps,

Eric.
 
Upvote 0

Forum statistics

Threads
1,223,373
Messages
6,171,693
Members
452,418
Latest member
kennettz

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top