View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default Solver or Other?

Simplification....

I wrote:
And add the following constraints: B1=integer, B2=integer, B1=0 and
B2=0


You can avoid the =0 constraints by clicking Option and setting Assume
Non-Negative.


----- original message -----

"JoeU2004" wrote in message
...
"Stan" wrote:
Should i use solver for this scenairo or try other ways?
Here i have 2 products: A and B
price of A $275
price of B $85
If i only have the total sales amount of A+B eg ($1165= 275*3 + 85*4),
how can i work back the quantity for each of the category?


Solver does work for this simple example. I don't know how well it would
do with more variables. Here is one way to use Solver.

In A1 and A2, put 275 and 85. In C1, put the formula =B1*A1+B2*A2. In
Solver, set the Target Cell to C1 with Equal To ... Value of 1165. Set
the By Changing field to B1,B2. And add the following constraints:
B1=integer, B2=integer, B1=0 and B2=0.