Contents

# 空白儲存格的處理方式

在較舊版的軟體中，空白儲存格在部分環境均會強制為數值 0，在其他環境中則會強制為空白字串，但直接比較除外，在這類比較中，若 A1 是空白，則 =A1=0 和 =A1="" 均會產生 TRUE。目前已繼承空白，仍可繼續使用，因此，若因此搜尋而傳回了空白儲存格，則 =VLOOKUP(...)=0 與 =VLOOKUP(...)="" 均會傳回 TRUE。

對於空白儲存格的簡單參照仍會顯示為數值 0，但其類型不再需要是數值，因此也可以視需要與參照儲存格進行比較。

針對下列範例，A1 包含一個數字、B1 是空白，而 C1 則包含對於 B1 的參照：

Case | Formula | Results and comments
--- | --- | ---
A1: 1 B1: <Empty> | C1: =B1 | Displays 0
=B1=0 | TRUE
=B1="" | TRUE
=C1=0 | TRUE
=C1="" | TRUE (previously was FALSE)
=ISNUMBER(B1) | FALSE
=ISNUMBER(C1) | FALSE (previously was TRUE)
=ISNUMBER(VLOOKUP(1;A1:C1;2)) | FALSE (B1)
=ISNUMBER(VLOOKUP(1;A1:C1;3)) | FALSE (C1, previously was TRUE)
=ISTEXT(B1) | FALSE
=ISTEXT(C1) | TRUE
=ISTEXT(VLOOKUP(1;A1:C1;2)) | FALSE (B1, previously was TRUE)
=ISTEXT(VLOOKUP(1;A1:C1;3)) | FALSE (C1)
=ISBLANK(B1) | TRUE
=ISBLANK(C1) | TRUE
=ISBLANK(VLOOKUP(1;A1:C1;2)) | TRUE (B1, previously was FALSE)
=ISBLANK(VLOOKUP(1;A1:C1;3)) | FALSE (C1)

請注意，Microsoft Excel 的運作方式不同，而且一律會傳回數值，做為對於空白儲存格之參照或含有空白儲存格結果之公式的結果。例如：

Case | Formula | Results and comments
--- | --- | ---
A1: <Empty> | B1: =A1 | Displays 0, but is just a reference to an empty cell.
=ISNUMBER(A1) | FALSE
=ISTEXT(A1) | FALSE
=A1=0 | TRUE
=A1="" | TRUE
=ISNUMBER(B1) | FALSE (Microsoft Excel: TRUE)
=ISTEXT(B1) | FALSE
=B1=0 | TRUE
=B1="" | TRUE (Microsoft Excel: FALSE)
C1: =VLOOKUP(...) with empty cell result | displays empty (Microsoft Excel: displays 0)
=ISNUMBER(VLOOKUP(...)) | FALSE
=ISTEXT(VLOOKUP(...)) | FALSE
=ISNUMBER(C1) | FALSE (Microsoft Excel: TRUE)
=ISTEXT(C1) | FALSE