OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Error 523 / Iterations

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
Gerco-Kees
Newbie
Newbie


Joined: 31 May 2006
Posts: 3

PostPosted: Wed May 31, 2006 1:48 am    Post subject: Error 523 / Iterations Reply with quote

Hi,

I try to count in cell A1 from 1 to 1000. Once i reach the 1000 value, calc has to start over counting again. In the tools > options > calc > calculate i have the iteration box marked, the max number of iterations are set to 100 and the minimum change is set to 0,001 (by default)

In cell A1 i enter:
=IF(A1>=1000;0;A1+1)

Now, excel comes with the err:523 message. What did i do wrong, and what is the solution?
Greetings,
_________________
Gerco-Kees
Back to top
View user's profile Send private message
Gerco-Kees
Newbie
Newbie


Joined: 31 May 2006
Posts: 3

PostPosted: Wed May 31, 2006 2:31 am    Post subject: Reply with quote

This is a reply on a removed reply, therefore this text is strikedthrough (in fact made it red).

That will not work, because in first instance, the value of A1 is equal to 0
so when testig wether a1<1000, this is true, and the formula evaluates to 0, and stays 0
.

What i want is a counter, starting from 0 counting to 1000 and then start again with 0 (with manual calculation enabled pressing {F9} a few times.

Greetings
_________________
Gerco-Kees


Last edited by Gerco-Kees on Wed May 31, 2006 5:26 am; edited 1 time in total
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Wed May 31, 2006 2:43 am    Post subject: Reply with quote

:oops: Sorry, I had some blackout. Removed that misleading reply. I have no clue and no time to check it out now.
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
noranthon
Super User
Super User


Joined: 07 Jul 2005
Posts: 3318

PostPosted: Wed May 31, 2006 5:18 am    Post subject: Reply with quote

I've never tried to do that. It seems to me that your formula should work and your second post is wrong because the test is whether A1>=1000. If yes, the result is 0. If the result is 0, then A1 is NOT >=1000, therefore the result is 1, and so on.

Changing the minimum step to 1, gets a count but it stops at various points depending on the number of steps specified. With steps 1,000 and minimum change of 1, I get various results which appear not to change with F9.

The example in Help enviseages reaching a final conclusion, not a never-ending loop.
_________________
search forum by month
Back to top
View user's profile Send private message
Gerco-Kees
Newbie
Newbie


Joined: 31 May 2006
Posts: 3

PostPosted: Wed May 31, 2006 5:43 am    Post subject: Reply with quote

My second post was a replay wich was deleted afterwards... I tried to strike it out as you can see.

What to do when i want an endless loop? Any suggestions?
_________________
Gerco-Kees
Back to top
View user's profile Send private message
noranthon
Super User
Super User


Joined: 07 Jul 2005
Posts: 3318

PostPosted: Wed May 31, 2006 4:37 pm    Post subject: Reply with quote

After posting earlier, it occurred to me that iteration is probably limited to the number of steps specified in Tools >Options.

I've used a counter with macros, for example, to specify when a file is saved or to indicate which table (by index number) should be extended. If you had a macro running continuously, though, the macro would have control of your document.

Some clever person who knows about event listeners could provide for the counter to increase on the occurrence of a specified event.
_________________
search forum by month
Back to top
View user's profile Send private message
thom314
OOo Enthusiast
OOo Enthusiast


Joined: 03 Aug 2005
Posts: 186
Location: Denver, Colorado

PostPosted: Sun Jun 04, 2006 1:57 pm    Post subject: Reply with quote

Quote:
What to do when i want an endless loop? Any suggestions?


I seriously doubt that you actually want an endless loop. It runs your CPU up to 100% and makes your life miserable.

I have never found a use for the built-in iteration capability of calc, I can just never get it to do what I want. Sometime the Goal Seek capability ( Tools -> Goal Seek ) can be useful. Other times, I have written a macro that modifies or recalculates the spreadsheet a specified number of times. I then add a form button to the spreadsheet to start the macro when I want.

Perhaps a few more details on what you are trying to accomplish would help us help you more.
Back to top
View user's profile Send private message
David
Super User
Super User


Joined: 24 Oct 2003
Posts: 5668
Location: Canada

PostPosted: Sun Jun 04, 2006 2:49 pm    Post subject: Re: Error 523 / Iterations Reply with quote

Gerco-Kees wrote:
In cell A1 i enter:
=IF(A1>=1000;0;A1+1)

Now, excel comes with the err:523 message. What did i do wrong, and what is the solution?
Greetings,


Don't use Excel ? Smile

Seriously, a spreadsheet is no designed for this sort of purpose. Although you are "programming" when setting formulas, it is not high-level programming as with Fortran, pascal, MS Visual Basic, VBA, Basic, ..... . I don't know enough about the BASIC associated with spreadsheets [MS has VBA, and here "BASIC" is the associated language, I believe.] However, perhaps someone can suggest using BASIC for this purpose, or flip to the Macro forum.

A question ...why? Do you expect an increment on a keypress, or a timed increment, or ....?

David.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group