Ask Your Question
0

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

asked 2013-08-04 08:51:39 +0200

L-user gravatar image

updated 2015-11-05 18:56:12 +0200

Alex Kemp gravatar image

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 flag offensive 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

2 Answers

Sort by » oldest newest most voted
1

answered 2013-08-04 11:11:13 +0200

Ljiljan gravatar image

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.

edit flag offensive delete link more

Comments

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.

oweng gravatar imageoweng ( 2013-08-04 11:14:36 +0200 )edit

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

L-user gravatar imageL-user ( 2013-08-05 07:40:13 +0200 )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.

oweng gravatar imageoweng ( 2013-08-05 12:11:50 +0200 )edit
1

answered 2013-08-04 09:01:57 +0200

L-user gravatar image

updated 2013-08-04 09:03:02 +0200

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.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-08-04 08:51:39 +0200

Seen: 6,580 times

Last updated: Aug 04 '13