« Sling Media Acquired by EchoStar | Main | Master Chief In Training Shows Up At Harvard »

September 25, 2007 1:46 PM

Excel 100000 Bug

Software has bugs.  Lots of them.  I am a master bug finder (anyone that has had me bang on their stuff likely has at least one anecdote about this.) 

Today’s “special bug” is a bug in Microsoft Excel 2007.  If you enter =850*77.1 into a cell you will get the result 100000.  Hint - that is an incorrect answer.  I tried it in Google Docs and it resulted in 65535 (the correct answer.)  Hmmm – I wonder what 2^16 is?  Boundary condition anyone?

Posted in: Programming

COMMENTS (11)

Quick note that it should be 100K rather than 10K. Pretty strange bug that seems to be tied to Excel's cell display rather than the calcing of the value. One of the Digg commenters noted that the VBA value property had it right. Very odd. I've definitely seen some strange Excel bugs over the years, though.

JonKelly Author Profile Page, September 25, 2007 2:54 PM

That isn't a bug, it's an Easter Egg!

Robert W. Anderson , September 25, 2007 3:31 PM

Wow. That is amazing.

I have to know - how'd you find that one?

Dan Ciruli , September 25, 2007 3:32 PM

@Dan - making the rounds today - saw it in a couple of places.

Brad Feld Author Profile Page, September 25, 2007 3:44 PM

Did you try changing the format to scientific notation before calculating it? I'm curious to see if that would make any difference. I'd try, but I have an ancient version of excel.

Lura , September 25, 2007 3:57 PM

@Lura - interesting idea, but it didn't work. I tried a number of different formats - they all come up 100000.

Brad Feld Author Profile Page, September 25, 2007 4:01 PM

It must be a bug in the display formatting code. When I use the result in other calculations, the math is correct. Although it has the same error for 65535 and 65536.

For instance,

=850*77.1*2 shows 131070
=850*77.1/850 shows 77.1
=850*77.1+1 shows 100001
=850*77.1+2 shows 65537

Peter Waldschmidt , September 25, 2007 4:34 PM

Brad - if your current gig doesn't work out, you can come work for us at ProtoTest anytime! Or maybe you could be a guest instructor in our Fundamentals of Software Testing class, where we *do* cover boundary values. :-)

Pete Dignan , September 25, 2007 7:41 PM

Per your response to Dan: so did YOU discover the bug or did you simply see it mentioned elsewhere? Your post implies, but does not say, that you discovered it yourself.

Dave , September 26, 2007 9:46 AM

I wish I could take credit for this one because it's so delicious but I can't. Several people emailed me about it and I was digg #1484 (or something like that.) A detailed explanation from Microsoft is at http://blogs.msdn.com/excel/archive/2007/09/25/calculation-issue-update.aspx

Brad Feld Author Profile Page, September 26, 2007 1:39 PM

Here is even patch for artifical Excel modification:
http://reverse-engineer.info/

drop , October 6, 2007 5:40 AM

Thanks for signing in, . Now you can comment. (sign out)

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


Remember me?