A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
<deleted. idea of no interest >
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I sometimes write analysis AI type programs in Excel, using Excel as an infinite loop state machine till can solve a problem.
I've wrote many years ago programmed searches for electronic component combinations to solve worst case environment and tolerance stacking rules.
I could set the limit to 100 billion, go to lunch or bed at night, and the computer would find combinations for me while I did other things. With newest Excel vs. 20 years ago, I can't do this. Excel has a 10,000 iteration limit. Fiddling with it manually, I can increase it to 29,999. Still not high enough. (Why 29,999?)
Yes, I want to to loop and consume processing time. For me it has a purpose.
My newest search program, probably not new to many... the 8 Queens Puzzle. I made an analysis program that will find combinations that solves this puzzle through automation. But I need Excel to iterate more than 10000 or 29999 times. My program will stop on its own when it finds a solution and search for more solutions.
How to I get the new Excel to iterate more than 29999 or 10000? ei. such as having a 1e^64 limit
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
<deleted. idea of no interest >
OK I got my Excel to accept 32767. I don't think I have a 20 year old lap top that still runs Excel. I'll have to try my antique IMSAI and convert the program to Fortran or BASIC. Or devise a less iterative programming sequence.
Thanks for your detailed response.
Greg B
AI answer
Excel’s iteration limit is hard-coded and cannot be raised to 1 billion or any value beyond the documented maximum.
According to the Excel specifications, the maximum number of iterations is 32,767. This is the upper bound for iterative calculation when resolving circular references and cannot be exceeded through options, registry edits, or code.
To change the limit up to that maximum:
For programmatic control (still subject to the same limit), the Application.MaxIterations property can be set from VBA or .NET interop, but it cannot exceed Excel’s internal maximum.
If more than 32,767 loop steps are required, the logic must be moved to another environment (e.g., VBA loops that do not rely on iterative calculation, or an external program) and only use Excel for input/output or visualization.
References: