Thursday, October 4, 2007

Excel 2007 Stricken with Bizarre Calculation Bug



Front and center in any "working guy" software arsenal is Microsoft Excel, the spreadsheet that's become a de facto industry standard. Earlier this week, reports surfaced of a strange error in Excel 2007 which caused calculations involving the number 65,535 (and thereabouts) to return wildly inaccurate results.

You can try it for yourself in Excel by multiplying 850 by 77.1. Excel will return 100,000 instead of 65,535. Similar operations that should return 65,535 will also come back incorrect, and there's a problem with 65,536, too. The problem is only present in Excel 2007; earlier versions of Excel are not affected.

Microsoft has traced the problem back to a floating point issue and how results are displayed within a cell in Excel. Microsoft says the calculation is actually done correctly, it's just that when it comes time to show the result on screen, Excel chokes. For example, if you multiply that "100,000" above by 2 and put the answer in a new cell, you'll get 131,070, not 200,000. However, this isn't reliable either: Try adding one and you get 100,001, not 65,536.

Microsoft says a fix is on the way and is in the final stages of testing. I'll update this post when the patch is available; hopefully Windows Update will also push it down automatically.