Description
Use this function to see if a cell is empty. Supported in Chains.
This returns TRUE if the cell is empty or FALSE if the selection is not empty.
語法
ISBLANK(value)
Inputs
This function has the following arguments:
名稱 | 必要 | 說明 | Valid Input |
---|---|---|---|
值 |
是 | The cell that you want to evaluate. | A reference to a cell, or a formula which results in one. |
範例
範例資料
A | B |
---|---|
56 | |
綠色 | 39 |
橙色 | 15 |
紅色 | 92 |
藍色 |
22 |
Sample formulas
公式 | 說明 | 結果 |
---|---|---|
=ISBLANK(A1) |
Checks to see if cell A1 is empty. | TRUE (because A1 is empty) |
=ISBLANK(A2) |
Checks to see if cell A2 is empty. | FALSE (because A2 contains "green") |
附註
- Cell ranges are not supported.
- You can join multiple instances of ISBLANK to check if any of a set of cells is blank:
=IF(OR(ISBLANK(A1),ISBLANK(B1),ISBLANK(C1)),"Missing value",SUM(A1:C1))
Because OR will return TRUE if any supplied value is TRUE, the formula will display "Missing value
" if any of the cells identified with an ISBLANK function return TRUE.
提示
You can use ISBLANK in these ways:
- To test for an empty cell in a dataset.
- To trigger a conditional formatting rule that highlights all empty cells (see Filling only blank cells with color).
- You can combine ISBLANK with the IF function to display a custom message if a cell is empty. For example, you might display "Input Required" if a cell is blank.
- Instead of
=ISBLANK(A1)
, you can use the expression=A1=""
. - You can combine ISBLANK with the NOT function to reverse the logic to "is not blank". Example:
=NOT(ISBLANK(A1))
- Instead of
=NOT(ISBLANK(A1))
, you can use the expression=A1<>""
. - If you want to count blank cells, use COUNTBLANK.
Related functions
COUNT
COUNTA
COUNTBLANK
COUNTIF
COUNTIFS
ISBLANK
ISERROR
ISNA
ISNUMBER
VALUE