Hello everyone,
I am trying to set a simple IF function Like this : "=IF(C2="TRUE",(B2),0) where "TRUE" comes from a cell with a checkbox connected to the same cell and B2 is a price in € and i get either error 508 or #NAME?
If anybody could help i would appreciate it.It is very simple so i think the problem might be that the checkbox has as LinkedCell the same cell as the checkbox itself.
Thanks in advance
[Solved] Checkbox and IF function problem
[Solved] Checkbox and IF function problem
Last edited by robleyd on Wed Jan 16, 2019 10:38 am, edited 2 times in total.
Reason: Add green tick
Reason: Add green tick
OpenOffice 4.1.5 on Windows 10
Re: Checkbox and IF function problem
Try
Things to note:
1. Use a semicolon between the parts of a function.
2. Using C2 = "TRUE" as the first part of the IF() does not work because the TRUE or FALSE value sent by the checkbox is a number, not the text "TRUE" or "FALSE". The cell format is set to display the number 1 as TRUE and the number 0 as FALSE. You can see this by changing the cell format of C2 with the menu Format -> Cells. If you set the format to display integers, clicking the checkbox will toggle the cell between 0 and 1.
3. In OpenOffice, FALSE is Zero and TRUE is Not Zero. So my formula is equivalent to
Code: Select all
=IF(C2;B2;0)
1. Use a semicolon between the parts of a function.
2. Using C2 = "TRUE" as the first part of the IF() does not work because the TRUE or FALSE value sent by the checkbox is a number, not the text "TRUE" or "FALSE". The cell format is set to display the number 1 as TRUE and the number 0 as FALSE. You can see this by changing the cell format of C2 with the menu Format -> Cells. If you set the format to display integers, clicking the checkbox will toggle the cell between 0 and 1.
3. In OpenOffice, FALSE is Zero and TRUE is Not Zero. So my formula is equivalent to
Code: Select all
=IF(C2 <> 0; B2;0)
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.