Calculation Issues

Why Excel Evolutionary Solver Tests Many Values with Integer Constraints

Kushani NimanthikaKushani Nimanthika Nov 18, 2026 870 views

Question details

Understand why Evolutionary Solver evaluates many candidates with integer constraints and how to solve a small integer problem.

Why Excel Evolutionary Solver Tests Many Values with Integer Constraints
Product
Microsoft Excel Solver
Device & OS
not provided
Scenario
Optimizing an objective with three integer decision variables and a small number of possible combinations.
Observed behavior
Evolutionary Solver may evaluate more candidates than the number of distinct integer combinations, including repeated or infeasible candidates.
Before you start

Check the allowed integer values for each variable and list all constraints. Three variables have exactly 27 combinations only if each can take three values before other constraints are applied.

Solution 1Recommended

Enumerate the Integer Combinations in an Excel Worksheet

Use a worksheet table when the number of combinations is small and you want to check every possibility.

Evolutionary Solver uses a heuristic search rather than systematically enumerating each combination. It may revisit candidates or evaluate infeasible ones; it does not simply round decimal values to integers.

The example below assumes each of three variables can be 0, 1, or 2. Adjust the formulas if your allowed values differ.

1
Create the combinations

Enter =MOD(ROW()-2,3) in A2, =MOD(INT((ROW()-2)/3),3) in B2, and =MOD(INT((ROW()-2)/9),3) in C2. Select A2:C2 and fill down through row 28 to generate 27 combinations.

2
Calculate the objective

In D2, enter your objective formula using A2, B2, and C2 as the variable values, then fill it down through D28.

3
Check the constraints

Add columns with formulas that test each additional constraint for the values in A2:C2. Fill the formulas down and use Data > Filter to show only feasible rows.

4
Find the best result

Sort the filtered objective column from largest to smallest for a maximization problem, or smallest to largest for a minimization problem. The first feasible row contains an optimal combination.

Enumerate the Integer Combinations in an Excel Worksheet
Check all constraints: The 27 rows cover the possible variable combinations in this example, but some may be infeasible if other constraints apply.
Check integer combinations in WPS

Enumerate Small Integer Problems in WPS Spreadsheets

Use WPS Spreadsheets to list the possible integer combinations, calculate the objective for each row, and filter out combinations that violate your constraints.

  1. 1. Open the worksheet: Open WPS Spreadsheets and select Open to load your Excel workbook, or create a blank spreadsheet.
  2. 2. List the combinations: For variables that each range from 0 to 2, enter =MOD(ROW()-2,3) in A2, =MOD(INT((ROW()-2)/3),3) in B2, and =MOD(INT((ROW()-2)/9),3) in C2. Fill A2:C2 down through row 28.
  3. 3. Calculate each objective: Enter your objective formula in D2 using A2, B2, and C2, then fill it down through D28.
  4. 4. Filter and sort the results: Add columns that test your other constraints, then use Data > Filter to show feasible rows. Sort the objective column in the direction that matches your goal.
Check every combination in a small integer optimization problem.Open and edit Microsoft Excel XLSX and XLS files.Use familiar formulas, filters, and sorting tools.Work in a free spreadsheet application with a familiar interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Evolutionary Solver evaluate more than 27 candidates?

Evolutionary Solver uses a heuristic search rather than an exhaustive list. It can revisit candidates and evaluate infeasible candidates, so its evaluations need not match the number of distinct combinations.

When are there exactly 27 integer combinations?

There are 27 combinations when each of three variables has exactly three allowed integer values, such as 0, 1, and 2. Additional constraints may reduce the number of feasible combinations.

Does an integer constraint mean Solver just rounds decimal values?

No. An integer constraint specifies that the final decision-variable values must be integers; Evolutionary Solver does not solve the problem simply by rounding decimal values.

When should I choose Simplex LP instead of Evolutionary Solver?

Choose Simplex LP in Data > Solver when the objective and all constraints are linear. Add integer constraints and bounds, and make sure Ignore Integer Constraints is not selected in Solver Options.