• Revista PROGRAMAR: Já está disponível a edição #53 da revista programar. Faz já o download aqui!

Sign in to follow this  
Followers 0

Critical Excel 2007 bug cripples users

4 posts in this topic

What is 850 x 77.1 ? a calculator will tell you it's 65535, but a critical flaw in Microsoft's Excel 2007 causes it return 100000 as the answer to this, and any other calculation for which the result is 65535.

Fonte: http://digg.com/microsoft/Critical_Excel_2007_bug_cripples_users

Tirado dos comentários:

Of interest is the fact that 65,535 is the largest number that can represented by an unsigned, 16 bit integer (i.e. 0xFFFF).

After a little experimentation in VBA, I have found that 100000 is only returned when accessing the cells "Text" property. When asking for the cells "Value" 65,535 is returned as expected.

I created a quick macro to test this after filling cell A1 with the formula "=850*77.1"

MsgBox (Range("A1").Text) => Alerts 100000

MsgBox (Range("A1").Value) => Alerts 65535

"and any other calculation for which the result is 65535"

I tested this myself. 850*77.1 indeed resulted in 10,000

but 85*771 resulted in 65535

Maybe it has something to do with one of the numbers including a decimal

From further in the discussion:

There appears to be more of them. For example:











What's even stranger is this: Suppose the formula is in A1.

=A1+1 returns 100001, which appears to show the formula is in fact 100000

and a very Serious problem.

And if you multiply be say, 2 you get something else:


returns 131070, as if A1 had 65535. (which it should have been)


Keeps it at 100000.

=A1-1 returns 65534

=A1/1 is still 100000

=A1/2 retuns 32767.5

Using MAX() on a range appears not to see 100000.

Erro no handling de floats? :P


Share this post

Link to post
Share on other sites

I cum carago... descobrem cada coisa... enfim... um pequeno bug.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0