How to Fix Excel Solver Returning Incorrect Results for a Second Scenario
Question details
The user is experiencing an issue where the Excel Solver add-in produces incorrect results, specifically forcing a variable cell to zero unexpectedly when running a second scenario or year in the same worksheet.

- Product
- Excel
- Device & OS
- Windows
- Scenario
- Running multiple consecutive scenarios or yearly calculations using the Solver add-in within a single worksheet.
- Observed behavior
- Solver returns an incorrect calculation for the second scenario and forces the designated variable cell to zero.
Before modifying your Solver parameters, ensure you save a backup copy of your workbook so you can safely compare the modified results against your original data.
Verify and Update Solver Parameters for the Second Scenario
Explicitly update the objective cell, variable cells, and constraints to reference the correct data ranges for the new scenario to prevent overlap or formula conflicts.
When calculating consecutive scenarios in the same worksheet, Solver often retains the parameters from the previous run. If these ranges are not carefully updated, the model may reference incorrect data or hit conflicting constraints, which frequently causes the variable cell to be forced to zero.
Navigate to the Data tab on the ribbon and click on Solver to open the parameters window.
Review the 'Set Objective' field and ensure it points to the correct target cell for the second scenario rather than the first year's data.
Verify that the 'By Changing Variable Cells' field matches your intended variable cell for the current run and is not being influenced by previous inputs.
Examine the constraints listed in the 'Subject to the Constraints' box. Remove or update any constraints that belong to the previous scenario and ensure no underlying formulas are mathematically forcing the variable to zero.
Once all references are updated to the current scenario's data, click 'Solve' to run the calculation independently.

Solve Complex Data Scenarios with WPS Spreadsheet
WPS Spreadsheet features a built-in Solver tool that seamlessly handles multiple variables and constraints. If you encounter persistent calculation errors in other software, migrating your workflow to WPS Office allows you to achieve accurate results quickly and reliably.
- 1. Open Your Workbook: Launch WPS Spreadsheet and open your existing .xlsx file containing your data scenarios.
- 2. Access the Solver Tool: Navigate to the Data tab on the top ribbon and click on Solver to open the calculation parameters.
- 3. Configure the Scenario: Input your specific objective cell, variable ranges, and related constraints for the scenario you wish to analyze.
- 4. Run the Calculation: Click Solve to execute the optimization and review your accurate results without unexpected variable resets.

Frequently Asked Questions
Why does Solver change my variable cell to zero?
This usually occurs when a defined constraint or an underlying worksheet formula mathematically forces the target value to zero. It can also happen if the starting value leads the algorithm into a local optimum of zero. Providing a realistic starting value and verifying your constraints usually resolves this.
Can I run multiple Solver scenarios simultaneously in the same worksheet?
No, Solver runs one model configuration at a time. To analyze multiple scenarios, you must run Solver separately for each one, ensuring you update the objective and variable ranges to reference the specific data for that scenario before clicking Solve.
Does WPS Office include a Solver feature?
Yes, WPS Spreadsheet includes a built-in Solver tool located under the Data tab. It allows you to perform advanced what-if analysis, manage constraints, and calculate complex optimizations just like you would in Microsoft Excel.




