How Do I Hide Cell If Another Cell is Blank?

Learn how to hide a cell in Google Sheets when another cell is blank, preventing errors like divide by zero and displaying a custom message instead.

You're going to find out how to hide a cell if another cell is blank. Here we have scores and games and we don't want to show an average unless there is a score in B2 here. Right now we're getting divide by zero because we're taking the score and dividing it by the number of games. If B2 is blank, we don't want to see this division, we just want to see nothing. So we can use isBlank B2 to give us true or false. True, it is blank. False, it's not blank. And then we can wrap that in an if statement. As the logical expression , we can leave that isBlank B2. And if it's true, meaning it is blank, we're going to leave it totally blank, just put another comma, we're not going to put anything there. And if it's false, meaning it's not blank We want to actually do the division, so B2 divided by C2. And now we have nothing. We can put a message here if we want, some text.

Need score. When we add the score, we will see another divide by zero number , and we can say three games. If we want to make sure that both B column and C column are not blank, we'll use OR. We'll say is blank C2. And now Both of these need to be filled out in order to see the score. So we need score and games.