Share via

How to Set Iteration Limit to 1 billion, 10K is not enough

greg bober 0 Reputation points
2026-06-09T19:25:23.64+00:00

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

Microsoft 365 and Office | Excel | For home | Windows
0 comments No comments

3 answers

Sort by: Most helpful
  1. Dana D 90 Reputation points
    2026-06-11T15:47:50.3+00:00

    <deleted. idea of no interest >

    Was this answer helpful?

    0 comments No comments

  2. greg bober 0 Reputation points
    2026-06-09T19:56:01.03+00:00

    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

    Was this answer helpful?

    0 comments No comments

  3. AI answer

    2026-06-09T19:25:35.7333333+00:00

    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:

    1. Open Excel and the workbook.
    2. Select File > Options > Formulas.
    3. In Calculation options, select Enable iterative calculation.
    4. Set Maximum Iterations to a value up to 32767.
    5. Optionally adjust Maximum Change for the precision/termination behavior.

    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:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.