Google-sheets – How to show blank cells instead of 0s in Google Sheets

formulasgoogle sheets

I have 4 empty cells, and a formula in 4 other cells that show data from those cells. The formulas look like this –

=IF(B5 > C5, B5, C5)
=IF(B5 > C5, C5, B5)

==IF(B7 > C7, B7, C7)
=IF(B7 > C7, C7, B7)

The original 4 cells are all blank, and the type is all set to automatic. But the ones in row 5 show as 0s, and the ones in row 7 show blank. I want them to be blank until I put values in the original cells.

How can I change it so the values in row 5 return blank instead of 0s?

Best Answer

I believe you want the following:

=if(or(isblank(B5), isblank(C5)), "", IF(B5 > C5, B5, C5))
=if(or(isblank(B5), isblank(C5)), "", IF(B5 > C5, C5, B5))

=if(or(isblank(B7), isblank(C7)), "", IF(B7 > C7, B7, C7))
=if(or(isblank(B7), isblank(C7)), "", IF(B7 > C7, C7, B7))