Questions about the functions

Discuss the spreadsheet application
Post Reply
Fedric
Posts: 1
Joined: Mon Aug 07, 2017 4:21 pm

Questions about the functions

Post by Fedric »

I read OOcalc's guide, but I do not bother myself.

Taking an example of 2 contiguous cells, put A1 and A2, I would like to make sure that:
- if there is a number between A1 and 6 in A2, a certain text appears; Let's put it, Pippo
- if there is a number in A1 from 7 to 12 in A2, another text appears; Let's put it, Pluto
- if there is a number in A1 at 12 in A2 a different text appears; Let's put it, Minnie
- if A1 there is nothing (empty) or zero, nothing should appear in A2 (stay empty)

Up to two "options" the following works well: = SE (C1 <= 6; "Pippo"; SE (C1> = 7; "Pluto"; ""))
But if I try to add> = 13, it does not take me ... anyway, always "Pluto"!?

I hope I was clear. Thank you very much if you want to deal with the case :-)

If you are interested in Ayurveda, I would like to make you feel digital in the digital format of the book I wrote on this topic.

Fedric
Last edited by FJCC on Sun Aug 13, 2017 2:36 am, edited 1 time in total.
Reason: I removed a comercial link.
OpenaOffice 3.1
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Questions about the functions

Post by RusselB »

It depends on the order that the conditions are encountered.
If you put the > 13 condition after the >= 7 condition, then the > 13 condition is never encountered, since the >=7 condition is matched previously.
If you put after the <=6 and before the >= 7 then the condition will be evaluated, and, if the condition is true, then it will return as you want.

BTW: You posted this in the Writer section of the help forum, when it's obviously supposed to be in the Calc section.

An example of a formula that meets the 4 conditions you have specified might look like

Code: Select all

=if(A1=0;"";if(A1<7;"Pippa";if(A1<13;"Pluto";"Minnie")))
Please note that my formula is written using US English. You may need to translate it for your language, which I suspect is not English as your example code uses SE where I suspect I am using IF
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
Post Reply