Tratamento das celas baleiras

In older versions of the software, empty cells were forced to numeric 0 in some contexts and to empty string in others, except in direct comparison where =A1=0 and =A1="" both resulted in TRUE if A1 was empty. Emptiness now is inherited until used, so both =VLOOKUP(...)=0 and =VLOOKUP(...)="" give TRUE if the lookup resulted in an empty cell being returned.

A simple reference to an empty cell is still displayed as numeric 0 but is not necessarily of type numeric anymore, so also comparisons with the referencing cell work as expected.

Nos exemplos seguintes, A1 contén un número, B1 está baleira e C1 contén a referencia a B1:

Case

Fórmula

Resultados e comentarios

A1: 1
B1: <Baleiro>

C1: =B1

Mostra 0

=B1=0

VERDADEIRO

=B1=""

VERDADEIRO

=C1=0

VERDADEIRO

=C1=""

VERDADEIRO (anteriormente era FALSO)

=ISNUMBER(B1)

FALSO

=ISNUMBER(C1)

FALSO (anteriormente era VERDADEIRO)

=ISNUMBER(VLOOKUP(1;A1:C1;2))

FALSE (B1)

=ISNUMBER(VLOOKUP(1;A1:C1;3))

FALSO (C1, anteriormente era VERDADEIRO)

=ISTEXT(B1)

FALSO

=ISTEXT(C1)

VERDADEIRO

=ISTEXT(VLOOKUP(1;A1:C1;2))

FALSO (B1, anteriormente era VERDADEIRO)

=ISTEXT(VLOOKUP(1;A1:C1;3))

FALSO (C1)

=ISBLANK(B1)

VERDADEIRO

=ISBLANK(C1)

VERDADEIRO

=ISBLANK(VLOOKUP(1;A1:C1;2))

TRUE (B1, previously was FALSE)

=ISBLANK(VLOOKUP(1;A1:C1;3))

FALSO (C1)


Icona Nota

Note that Microsoft Excel behaves different and always returns a number as the result of a reference to an empty cell or a formula cell with the result of an empty cell. For example:


Case

Fórmula

Resultados e comentarios

A1: <Empty>

B1: =A1

Mostra 0, mais é só unha referencia a unha cela baleira.

=ISNUMBER(A1)

FALSO

=ISTEXT(A1)

FALSO

=A1=0

VERDADEIRO

=A1=""

VERDADEIRO

=ISNUMBER(B1)

FALSE (Microsoft Excel: TRUE)

=ISTEXT(B1)

FALSO

=B1=0

VERDADEIRO

=B1=""

TRUE (Microsoft Excel: FALSE)

C1: =VLOOKUP(...) with empty cell result

mostra baleiro (Excel da Microsoft: mostra 0)

=ISNUMBER(VLOOKUP(...))

FALSO

=ISTEXT(VLOOKUP(...))

FALSO

=ISNUMBER(C1)

FALSO (Excel da Microsoft: VERDADEIRO)

=ISTEXT(C1)

FALSO


Precisamos da súa axuda!