IF function: Why does Calc automatically change TRUE/FALSE to 1/0?

Hi,

using LibreOffice Calc 4.0.4 on Windows XP.


Cell A1=TRUE, Cell B1=FALSE, Cell C1=IF(AND(A1=TRUE;B1=FALSE);FALSE;TRUE)
but when I press Enter after typing formula in C1 Calc automatically changes formula to =IF(AND(A1=1;B1=0);0;1) and the result is 0. I would like to get FALSE and not 0.

Why does Calc automatically change TRUE/FALSE to 1/0?

Thanks

I have partially found out an answer. Select all of the cells, then Format | Cells. Numbers tab | Category = Boolean Value and OK. Now all of the values in spreadsheet are displayed as TRUE/FALSE. Which is what I want.



Still do not understand why =IF formula has changed from TRUE/FALSE to 1/0.

I assume it is because of the languages… Calc provides formulas in different languages so TRUE/ FALSE are different in different languages (in my is for example TACNO/ NETACNO). Therefore, it converts it in zero/ one… try to write formula “=TRUE()” to see the results in your language.

To add to this answer, the stored value is 0 or 1, whereas what is displayed can be set to a variety of different possibilities according to cell format and locale/language.

=TRUE() displays TRUE, I have an English/USA settings in Calc.

I now have a feeling that my prior comment is wrong (or inaccurate). I can’t edit it or marked the comment down though and I would rather not delete it. If cells are set to use the Boolean Value format then =TRUE(), =1, and 1 all appear to be stored as the string “TRUE” (en-AU locale). IMO this seems odd for the reason that @Ljiljan indicates. It also seems to be at odds with the question, so I am at a loss to explain why this behaviour occurs.