[Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register]

Author Message
agareau
General User

Joined: 17 Mar 2010
Posts: 7

 Posted: Sun Sep 12, 2010 10:29 am    Post subject: Apparent "IF" nesting limit In converting some programs from my old spreadsheet to openoffice, I have come upon either an apparent limitation of OpenOffice or my lack of understanding of Calc. I cannot get Calc to calculate beyond 3 levels of Nesting. Any suggestions ?
agareau
General User

Joined: 17 Mar 2010
Posts: 7

 Posted: Sun Sep 12, 2010 1:45 pm    Post subject: Digging deeper into the "IF" problem Upon further examination, the "IF" command can be nested much deeper than 3 levels when all of the cells are ccontiguous. However if they are separated, then it will "bomb" after 3 levels. As an example: the testing cell contains =IF(A2<>" ";A2;IF(A3<>" ";A3;IF(A4<>" ";A4;IF(A5<>" ";A5;IF(A6<>" ";A6;IF(A7<>" ";A7;" ")))))) and the the cells being tested are contiguous and the "IF" command works to these 6 levels. However, if the cells being tested were positioned in 3 groups of 2, such as A2,A3,C2,C3,E2,E3 and using the following test command =IF(A2<>" ";A2;IF(A3<>" ";A3;IF(C2<>" ";C2;IF(C3<>" ";C3;IF(E2<>" ";E2;IF(E3<>" ";E3;" ")))))) then the command ceases to work beyond 3 levels. Hope this strikes a chord with someone !
scsisys

Joined: 17 Dec 2009
Posts: 248

 Posted: Sun Sep 12, 2010 5:10 pm    Post subject: The following works for me... =IF(A2<>"";A2;IF(A3<>"";A3;IF(C2<>"";C2;IF(C3<>"";C3;IF(E2<>"";E2;IF(E3<>"";E3;IF(G2<>"";G2;IF(G3<>"";G3;IF(I2<>"";I2;IF(I3<>"";I3;"")))))))))) Copying your example and pasting into Calc (V 3.2.1) only worked for the A2 cell reference. Deleting the spaces between the " " to look like this "" through out the formula, it then returned the correct values upon deleting a value in each of the named cells. Ray
agareau
General User

Joined: 17 Mar 2010
Posts: 7

 Posted: Sun Sep 12, 2010 7:40 pm    Post subject: Thanks Ray. I will play with this to see if the program functions properly. The cells being tested do get overwritten and sometimes "spaced" out. It's strange that it works for the first 3 levels and no more, yet when contiguous, there appears to be no problem. Unfortunately, I haven't learned how to report "Bugs" yet. Again, Thanks ! Andre
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT - 8 Hours Page 1 of 1

 Jump to: Select a forum OpenOffice.org Forums----------------Setup and TroubleshootingOpenOffice.org WriterOpenOffice.org CalcOpenOffice.org ImpressOpenOffice.org DrawOpenOffice.org MathOpenOffice.org BaseOpenOffice.org Macros and APIOpenOffice.org Code Snippets Community Forums----------------General DiscussionSite Feedback
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum