IFBLANK() – Returns a value if a cell is blank, otherwise returns the cell's value
The IFBLANK() function checks if a specified cell or value is blank (empty). If it is blank, the function returns a designated replacement value. If the cell is not blank, it returns the original value of the cell.
Syntax
IFBLANK(value, replacement)
- value: The cell reference or value to check for blankness (e.g., T1A1).
- replacement: The value to return if the value argument is blank. This can be text, a number, or another formula.
Basic example
IFBLANK(T1A1, "No data")
This example checks if cell T1A1 is empty.
- If T1A1 is empty, the function returns "No data".
- If T1A1 contains any value (e.g., the number 5, or text "Hello"), the function returns that original value (e.g., 5 or "Hello").
Key features
- Blank cell detection: Specifically designed to handle empty cells gracefully.
- Default value provision: Allows you to specify a default output when data is missing.
- Preserves existing data: If the cell is not blank, its content is returned unchanged.
Practical uses
- Displaying a placeholder like "N/A", "To be determined", or "0" when input cells are empty to avoid errors or blank outputs in subsequent calculations.
- Cleaning data by replacing genuinely blank cells with a consistent value.
- In conditional formatting or checks, to identify cells that require data entry.
Common mistakes
- Confusing blank with zero: A cell containing the number 0 is not considered blank. IFBLANK(cell_with_0, "Is Blank") would return 0.
- Text replacement not in quotes: If the replacement value is intended to be text, it must be enclosed in double quotes (e.g., "Missing").
- Expecting it to check for specific text like "blank": IFBLANK() checks for true emptiness, not for cells containing the word "blank" or similar text.
MathGrid ©
MathGrid ©