Ir para o conteúdo
  • Revista PROGRAMAR: Já está disponível a edição #57 da revista programar. Faz já o download aqui!


Critical Excel 2007 bug cripples users

Mensagens Recomendadas

djthyrax    11

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.


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

Partilhar esta mensagem

Link para a mensagem
Partilhar noutros sites

Crie uma conta ou ligue-se para comentar

Só membros podem comentar

Criar nova conta

Registe para ter uma conta na nossa comunidade. É fácil!

Registar nova conta


Já tem conta? Inicie sessão aqui.

Entrar Agora


Aviso Sobre Cookies

Ao usar este site você aceita a nossa Política de Privacidade