Compare the cell with empty text: =IF(A2="", "Missing", "OK"). This also treats a formula that returns "" as blank. ISBLANK works too, but only for cells that are truly empty.
{"cells": {"A1": "Qty", "A2": 3, "A3": "", "A4": 12, "A5": 5, "B1": "Price", "B2": 1250, "B3": 320, "B4": "", "B5": 80, "C1": "Total", "C2": "=IF(OR(A2=\"\",B2=\"\"),\"\",A2*B2)", "C3": "=IF(OR(A3=\"\",B3=\"\"),\"\",A3*B3)", "C4": "=IF(OR(A4=\"\",B4=\"\"),\"\",A4*B4)", "C5": "=IF(OR(A5=\"\",B5=\"\"),\"\",A5*B5)", "D1": "Status", "D2": "=IF(AND(A2\u003c\u003e\"\",B2\u003c\u003e\"\"),\"OK\",\"Missing data\")", "D3": "=IF(AND(A3\u003c\u003e\"\",B3\u003c\u003e\"\"),\"OK\",\"Missing data\")", "D4": "=IF(AND(A4\u003c\u003e\"\",B4\u003c\u003e\"\"),\"OK\",\"Missing data\")", "D5": "=IF(AND(A5\u003c\u003e\"\",B5\u003c\u003e\"\"),\"OK\",\"Missing data\")"}, "focus": "C2", "note": "Type a quantity in A3 and watch C3 and D3."}
IF with an empty string
Two double quotes with nothing between them mean "empty".
=IF(A2="", "Missing", "OK")Missing when A2 is empty.=IF(A2<>"", A2*B2, "")Calculates only when A2 has a value; otherwise stays blank.Several cells at once
Combine the tests with OR or AND.
=IF(OR(A2="", B2=""), "", A2*B2)Blank until both inputs are filled in.=COUNTBLANK(A2:D2)=0TRUE when the whole row is complete.ISBLANK
TRUE only for a cell with nothing in it at all.
=IF(ISBLANK(A2), "Missing", "OK")The same check with ISBLANK.Common mistakes
- ISBLANK says FALSE for an empty-looking cell
- The cell holds a space or a formula returning "". Use
A2=""orLEN(TRIM(A2))=0. - A 0 appears instead of blank
- The formula returns 0 for an empty input. Wrap it:
=IF(A2="", "", your formula).
Frequently asked questions
How do I check if a cell is not blank?
=A2<>"", or =NOT(ISBLANK(A2)).
How do I count blank cells?
=COUNTBLANK(A2:A100). See COUNTBLANK.
How do I highlight blank cells?
Conditional formatting with the formula =$A2="", or F5 → Special → Blanks.