-
Nested IF on OpenOffice Calc
Code:
=IF(C2="+"; RIGHT(B2,2); IF(C2="-"; RIGHT(B2,2); RIGHT(C2,1)))
That's the nested if. Simple really, IF a cell = + then I want the right 2 elements of another cell, if that same cell = - then I want the right 2 elements of another cell otherwise just give me the last element of the cell.
I have looked all over and from what I have found I have the syntax correct but I am still getting an Err:508
One by one the penguins steal my sanity...
Vanpooling now...
-
One by one the penguins steal my sanity...
Vanpooling now...
-
I'm not sure I completely understand what you want your result to be, but if I'm reading your formula correctly, this is what worked for me.
=IF(OR(C2="+";C2="-");RIGHT(B2;2);RIGHT(C2;1))
-
Doesn't work
I have OpenOffice 3.0
Open SuSE 11.0
KDE 3.5
In column B there are entries like below:
s3nD+
s2nC
s1nA
s1nA+
s1nA
s1nB-
s1nA
s1nA
s1nA+
s1nA
s1nA
s1nB
s1nA-
s1nA
I want the to extract the right most character if there is no + or -.
If there is a + or - then I want to extract the 2 right most characters.
I can get it to work with one but not two. Never mind, I found another solution. Thanks though!
One by one the penguins steal my sanity...
Vanpooling now...
-
Ah, I think I see what you wanted now. I know you've already found your solution but I'll post my formula anyway.
=IF(OR(RIGHT(B2;1)="+";RIGHT(B2;1)="-");RIGHT(B2;2);RIGHT(B2;1))
I have OO 2.4 on Debian Lenny.
-
I've never used OO macros at all, so this syntax may be horrifically wrong. But another solution seems to present itself:
=RIGHT(B2, LENGTH(B2)-3)
Should work whether a + is present, a - is present, or neither is present -- at least for the input list you gave.
-
I bow to the master
I knew all those RIGHTs bothered me! Syntax is a little off but a lesson well learned.
=RIGHT(B2;LEN(B2)-3)
thanks bwkaz!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|