Use Excel Solver to Reach a Target Sales Amount
Question details
Find product prices and quantities that bring total sales revenue close to a target using Excel Solver.

- Product
- Microsoft Excel Solver
- Device & OS
- not provided
- Scenario
- A seller wants to model multiple products with price, quantity, inventory, and demand constraints.
- Observed behavior
- The desired result is a realistic combination of prices and quantities that meets or approaches the sales target.
Gather the sales target, starting prices and quantities, price limits, inventory limits, and any available demand estimates. Decide whether quantities must be whole numbers and whether reaching revenue or maximizing profit is the actual goal.
Minimize the Gap Between Sales Revenue and the Target
Use Solver to adjust prices and quantities while respecting the limits that make the result meaningful.
The objective below minimizes the squared difference between target and actual revenue. It does not maximize profit or guarantee that the resulting quantities will sell.
Price multiplied by quantity makes this a nonlinear model when both are variable. A demand relationship and sensible bounds help prevent unrealistic combinations.
In desktop Excel, open File > Options > Add-ins. Under Manage, select Excel Add-ins, click Go, check Solver Add-in, and click OK. Solver should appear on the Data tab.
Enter starting prices in C2:C14, starting quantities in D2:D14, and the target revenue in H2. Enter minimum prices in F2:F14, maximum prices in G2:G14, and available inventory in I2:I14.
Enter =SUMPRODUCT(C2:C14,D2:D14) in J2. In J3, enter =(H2-J2)^2 to calculate the squared difference from the target.
In E2:E14, enter demand formulas or estimates based on the prices in column C and your available data. For example, a formula may reduce estimated demand as price rises; choose its parameters from evidence rather than assuming a universal relationship.
Open Data > Solver. Set Objective to J3, select Min, and set By Changing Variable Cells to C2:D14. Add constraints C2:C14 >= F2:F14, C2:C14 <= G2:G14, D2:D14 >= 0, D2:D14 <= I2:I14, and D2:D14 <= E2:E14. If quantities must be whole numbers, add an int constraint for D2:D14.
Select GRG Nonlinear as the solving method and click Solve. Review the proposed prices, quantities, and revenue in J2, then choose whether to keep the solution. If Solver cannot find a suitable result, review the bounds and demand assumptions and try different starting values.

Prepare Your Sales Model in WPS Spreadsheets
WPS Office is a free, lightweight alternative with a familiar spreadsheet interface. Open compatible Excel workbooks to prepare sales data and revenue formulas as you move between office suites; it does not fix or replace Microsoft Excel Solver.

Frequently Asked Questions
Why does Solver need a demand relationship?
Without a link between price and demand, Solver can choose price and quantity combinations that meet the target but are unlikely to occur. Add demand estimates or formulas to the worksheet and constrain quantities to those estimates in Data > Solver.
How do I require whole-number quantities?
In Data > Solver, click Add and select the quantity range, such as D2:D14. Choose int as the constraint type, then click OK.
What does it mean if the squared difference is not zero?
The proposed revenue does not exactly match the target. The target may be outside the feasible range, or Solver may not have found the best solution. Check the constraints and try different starting values.
Does reaching the sales target maximize profit?
No. The objective minimizes the gap between revenue and the target. To maximize profit, calculate revenue minus relevant costs in a separate cell and set Solver to maximize that cell, subject to your constraints.




