Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-09-2010, 10:24 AM
markg2 markg2 is offline Formula problem? Windows 7 Formula problem? Office 2007
Expert
Formula problem?
 
Join Date: Nov 2009
Location: Evergreen, CO
Posts: 344
markg2 is on a distinguished road
Default Formula problem?

I have just found a problem in a very simple spreadsheet (explained below) for which I do not understand the reason.



A1: 7280
A2: 6640
B2: difference formula =A1-A2 [cell displays (640.00)]
C2: division formula =614.73/A2 [cell displays .09]
D2: multiplication formula =B2*C2 [cell displays 59.25]

I inserted these identical cells within an Open Office spreadsheet. The result was the same as above.

However, for the cell displaying 59.25, my wife showed a value of 57.60 on her calculator, which matched a manual effort.

I changed the D2 formula and instead of using cell C2 (a formula) I used a different cell wherein I manually entered the result of the C2 formula, .09. The result then matched the calculator result of 57.60

Can someone explain what is going on?
Reply With Quote
  #2  
Old 06-09-2010, 12:59 PM
Kimberly Kimberly is offline Formula problem? Windows 7 Formula problem? Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Posts: 517
Kimberly is on a distinguished road
Default

Data is very often displayed differently than it is stored... formatting can only change the appearance of data; formatting is not capable of changing values.

To see the true contents of a cell, select the cell and look at the Formula bar (wide white thing above the column letters). I suspect cell A2 is lying to you.
Reply With Quote
  #3  
Old 06-09-2010, 01:34 PM
ConneXionLost's Avatar
ConneXionLost ConneXionLost is offline Formula problem? Windows XP Formula problem? Office 2003
Simulacrum
 
Join Date: Jan 2010
Location: Victoria, Canada
Posts: 86
ConneXionLost is on a distinguished road
Default

It appears you have the cell number format limited to two decimal places.

The actual cell values ofr your calculations is

C2: 0.0925798192771084
D2: 59.2510843373494

Just change your cell formats to see the rest of the numbers.

Cheers,

P.S. - I think Kimberly meant C2 vice A2.
Reply With Quote
  #4  
Old 06-09-2010, 03:43 PM
markg2 markg2 is offline Formula problem? Windows 7 Formula problem? Office 2007
Expert
Formula problem?
 
Join Date: Nov 2009
Location: Evergreen, CO
Posts: 344
markg2 is on a distinguished road
Default

I had earlier pasted a section of the Excel sheet into an Open Office spreadsheet to confirm the problem. When confirmed, I posted my question on their forum in addition, needing a resolution before this Friday.

Remembering my initial post problem was that the spreadsheet value returned from the multiplication was ~1.65 different than that returned by a calculator (59.25 vs. 57.60).

The answer you guys gave does not change that fact--the answer is still 59.25xxxxx. But the answer that the Oo person returned did provide a way to align the calculator vs. spreadsheet as quoted below:

"Use a calculator and multiply .09*640 and you get 57.6. The actual value in the cell is .0926 rounded to four decimals. .0926*640=59.264 according to my calculator not a spreadsheet. A spreadsheet always uses the exact value no matter how you format the cell for display purposes.
Go to Tools-->Options-->Openoffice.org Calc-->Calculate and check the box "Precision as Shown" and you will get the result I show above in your spreadsheet."

Since this spreadsheet will be given to a group of folks who use calculators far more than spreadsheets, the numbers need to match that of a calculator. I do not see an option within Excel that corresponds to the 'Precision as Shown' option of Oo? Is there one or a way of getting a similar result?
Reply With Quote
  #5  
Old 06-09-2010, 06:05 PM
Kimberly Kimberly is offline Formula problem? Windows 7 Formula problem? Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Posts: 517
Kimberly is on a distinguished road
Default

Excel Options > Advanced > Set precision as displayed
Reply With Quote
  #6  
Old 06-09-2010, 06:19 PM
markg2 markg2 is offline Formula problem? Windows 7 Formula problem? Office 2007
Expert
Formula problem?
 
Join Date: Nov 2009
Location: Evergreen, CO
Posts: 344
markg2 is on a distinguished road
Default

Thanks (again) Kimberly.
Reply With Quote
  #7  
Old 06-09-2010, 06:22 PM
markg2 markg2 is offline Formula problem? Windows 7 Formula problem? Office 2007
Expert
Formula problem?
 
Join Date: Nov 2009
Location: Evergreen, CO
Posts: 344
markg2 is on a distinguished road
Default

One other question. By default, how many decimal places does Excel use in calculations?
Reply With Quote
  #8  
Old 06-09-2010, 07:27 PM
Kimberly Kimberly is offline Formula problem? Windows 7 Formula problem? Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Posts: 517
Kimberly is on a distinguished road
Default

15 digits of precision... without regard to the position of the decimal point.

Excel, like most computer programs, uses a number storage standard named IEEE Double Precision Floating Points. Numbers stored in this format are limited to 15 digits of precision, beyond which the numbers are rounded.

Institute of Electrical and Electronic Engineers (IEEE) is an international organization that determines standards for computer software and hardware. The 754 specification is a very widely adopted specification that describes how floating-point numbers can be stored in a binary computer.

There is, for example, no way to represent 0.1 in a finite number of digits in binary.

I would look at the many rounding functions, such as ROUND(), if I were you, instead of setting the 'precision as displayed'.
Reply With Quote
  #9  
Old 06-09-2010, 07:38 PM
Kimberly Kimberly is offline Formula problem? Windows 7 Formula problem? Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Posts: 517
Kimberly is on a distinguished road
Default

15 digits of precision... without regard to the position of the decimal point.

Excel, like most computer programs, uses a number storage standard named IEEE Double Precision Floating Points. Numbers stored in this format are limited to 15 digits of precision, beyond which the numbers are rounded.

Institute of Electrical and Electronic Engineers (IEEE) is an international organization that determines standards for computer software and hardware. The 754 specification is a very widely adopted specification that describes how floating-point numbers can be stored in a binary computer.

There is, for example, no way to represent 0.1 in a finite number of digits in binary.

I would look at the many rounding functions, such as ROUND(), if I were you, instead of setting the 'precision as displayed'.
Reply With Quote
  #10  
Old 06-09-2010, 07:41 PM
Kimberly Kimberly is offline Formula problem? Windows 7 Formula problem? Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Posts: 517
Kimberly is on a distinguished road
Default

I sort of misspoke slightly, I should have said that you can't represent 0.1 in binary floating point. Much like you can't represent 1/3 in our decimal number system.
Reply With Quote
  #11  
Old 06-10-2010, 06:09 AM
markg2 markg2 is offline Formula problem? Windows 7 Formula problem? Office 2007
Expert
Formula problem?
 
Join Date: Nov 2009
Location: Evergreen, CO
Posts: 344
markg2 is on a distinguished road
Default

A couple of clarifications Kimberly...

If the limit is 15 digits regardless of the decimal, then the spreadsheet couldn't calculate 100 trillion?

There's no difference between round(2) and Round as shown (assuming the as shown cells have been set to 2 decimals) correct? I will not be using either of the conventions--my wife will for a specific group of folks. This group does not generally use spreadsheets--they use a calculator. This effort is to avoid conflicts wherein her spreadsheet values do not align with those of an ordinary calculator.

I'm very interested in this discussion since I never realized this stuff before and I'm sure this new knowledge, once I understand it better, will help me in the future.
Reply With Quote
  #12  
Old 06-10-2010, 07:42 AM
Kimberly Kimberly is offline Formula problem? Windows 7 Formula problem? Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Posts: 517
Kimberly is on a distinguished road
Default

Have a look on the Web at double precision floating point numbers and also at precision as displayed and round. They are sure deep subjects.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
excel help Formula sellspeed Excel 15 03-10-2010 10:57 AM
Formula problem? Help with Formula Corca Excel 6 02-22-2010 09:40 PM
Formula problem? If formula sixhobbits Excel 1 10-02-2009 08:02 AM
Help for formula dehann Excel 5 05-01-2009 10:44 AM
Formula problem? Need help with a formula tinkertron Excel 11 04-16-2009 11:43 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:44 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft