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?

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

11 Comments on “Excel 100000 Bug”

  • JonKelly September 25th, 2007 2:54 pm

    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.

  • Robert W. Anderson September 25th, 2007 3:31 pm

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

  • Dan Ciruli September 25th, 2007 3:32 pm

    Wow. That is amazing.

    I have to know – how’d you find that one?

  • Brad Feld September 25th, 2007 3:44 pm

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

  • Lura September 25th, 2007 3:57 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.

  • Brad Feld September 25th, 2007 4:01 pm

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

  • Peter Waldschmidt September 25th, 2007 4:34 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

  • Pete Dignan September 25th, 2007 7:41 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. :-)

  • Dave September 26th, 2007 9:46 am

    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.

  • Brad Feld September 26th, 2007 1:39 pm

    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

  • drop October 6th, 2007 5:40 am

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

Leave a Reply