To show something else when a cell is empty, test the cell against empty text:
=IF(A2="", "", A2*B2)
If A2 is empty, the formula shows nothing. Otherwise it multiplies A2 by B2. The rest of this article covers how blank cells behave and what to do when they don’t behave as you expect.
Test for empty with =“”
=IF(A2="", "Missing", "Entered") returns Missing when A2 is empty. The test A2="" is TRUE for a truly empty cell. It is also TRUE for a cell that holds a formula returning empty text, such as =IF(C2>0, C2, "").
ISBLANK: a stricter test
ISBLANK checks whether a cell has any content at all:
=IF(ISBLANK(A2), "Missing", "Entered")
The difference matters when a formula returns empty text. ISBLANK returns FALSE for a cell whose formula gives “”, because that cell does have a formula in it. Use ISBLANK when you need to know whether anything was entered or calculated. Use =“” when empty text should count as blank too.
Cells that look blank but aren’t
A cell that holds only a space looks empty, but both tests above treat it as filled in. To catch these cells, remove the spaces first with TRIM and count the characters with LEN:
=IF(LEN(TRIM(A2))=0, "Missing", "Entered")
TRIM removes leading and trailing spaces and reduces runs of spaces between words to one. LEN counts characters, so a result of 0 means nothing is left. TRIM doesn’t remove non-breaking spaces, which often come in from web pages or other software. SUBSTITUTE can replace those before the trim.
Avoid a zero where the input is blank
A formula like =A2*B2 shows 0 when A2 is empty. Wrapping it in an IF hides that:
=IF(A2="", "", A2*B2)
Be careful with the result, though. Empty text isn’t a number, so if another formula multiplies it, Excel returns #VALUE!. SUM and AVERAGE skip empty text inside a range, so totals usually stay correct. If other formulas will do math with this column, a 0 may be easier to work with, so decide based on how the column is used.
A blank counts as zero in comparisons
A blank cell acts as 0 when compared with a number, so =A2=0 returns TRUE for an empty A2. If a blank and a zero need different results, test for blank first:
=IF(A2="", "Blank", IF(A2=0, "Zero", "Entered"))
Blank lookup results
When a lookup finds no match, it returns an error unless the formula handles that case. XLOOKUP has an optional if_not_found argument that can return a blank instead. See xlookup return blank if not found for how to set it up.
For other errors, IFERROR is an option, covered in how to hide errors in excel formulas. It should come after you’ve checked that the blank is the right result.