Tuesday, May 17, 2022

Using if to check if a cell is blank

Sometimes you need to check if a cell is blank, generally because you might not want a formula to display a result without input.

Formula in cell E2 is =IF(D2=1,"Yes",IF(D2=2,"No","Maybe"))

In this case we're using IF with the ISBLANK function:

  • =IF(ISBLANK(D2),"Blank","Not Blank")

Which says IF(D2 is blank, then return "Blank", otherwise return "Not Blank"). You could just as easily use your own formula for the "Not Blank" condition as well. In the next example we're using "" instead of ISBLANK. The "" essentially means "nothing".

Checking if a cell is blank - Formula in cell E2 is =IF(ISBLANK(D2),"Blank","Not Blank")

=IF(D3="","Blank","Not Blank")

This formula says IF(D3 is nothing, then return "Blank", otherwise "Not Blank"). Here is an example of a very common method of using "" to prevent a formula from calculating if a dependent cell is blank:

  • =IF(D3="","",YourFormula())

    IF(D3 is nothing, then return nothing, otherwise calculate your formula).

1 comment:


  1. I never thought it was possible to recover stolen cryptocurrency due to my past experience trying to recover $228k that was stolen from my usdt w.a.l.l.e.t; until I read an article on this webpage www.thedailychargeback.com , I summited all documents needed to carryout the recovery operation, they successfully recover $205k from what I lost, I advice anyone having problems with lost or stolen cryptocurrency issues to reach to them.

    ReplyDelete