# IF function: Why does Calc automatically change TRUE/FALSE to 1/0? [closed]

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

edit retag reopen merge delete

### Closed for the following reason question is not relevant or outdated by Alex Kemp close date 2015-11-05 18:56:26.597323

Sort by » oldest newest most voted

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.

more

1

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.

( 2013-08-04 11:14:36 +0100 )edit

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

( 2013-08-05 07:40:13 +0100 )edit

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.

( 2013-08-05 12:11:50 +0100 )edit

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.

more