Jump to content

unexpected query results with cell content 0


Recommended Posts

Hello folks,
i have a question because I can not explain query results. May you can give a helping hand.

There´s a cell with content 0. If i query the content with ISEMPTY(cell) the result is false - as expected.

If i check the cell with: IF(#cell == "0";"True";"False") the result is "True". But if i query like: IF(#cell == "";"True";"False") the result is "True" too - i would expect False.

Could someone explain this to me?

Best Regards

Edited by Malte Schnau
Link to comment
Share on other sites

Hi,

this is as designed, but not easy to explain 🙂

The reason for that is the value left of the "=" defines the value type which should be compared. So in case of 

#cell1 == ""

if cell1 contains a 0, a numerical comparison is applied. For this purpose, the value right to the "=" is first converted to a number. And a conversion from an empty string to a number returns 0 (in the same way as NUMBER("") returns 0 as well). So this comparison returns true. 

 

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...