Show empty string instead of zero as a result of reference to an empty text field

I’ve come across a weird behavior:

  • Leave cell A1 empty;
  • Type =A1 formula in cell B1;
  • The cell now shows “0” instead of empty string;
  • Changing the cell A1 format to “text” does not fix this.

Now, I can “improve” the formula to =IF(A1="","",A1), and that works. But why does the default behavior is showing that zero?

Welcome!
Perhaps the T() function will help you? It’s a little shorter than IF():
=T(A1)

1 Like

Thank you, wasn’t aware of such function. But I wonder why that default behavior is there in the first place.

Oh, it’s written about it here - Handling of Empty Cells

2 Likes

Because other major spreadsheet implementations do it as well and users freak out if they don’t see what they are used to.