#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Donna
 
Posts: n/a
Default solver problem

I have a series of values both positive and negative that I want to change so
that they add up as close as possible to a given value. For example 100000 +
200000 + +300000+ 80000+ -50000 + -250000 I want to change so that they add
up as close as possible to 300000.

The problem is that the only change in value of the cells I want to allow is
to change them to 0 and I am having trouble setting up the constraints to do
that.
I can see that the answer is to change the 80000 to zero to give me the
300000 but how can I get solver to do this?

Thanks, Donna
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bpeltzer
 
Posts: n/a
Default solver problem

If these values are in A1:A10, you could create a corresponding set of values
in B1:B10, initially filled with 1's. Your result can be expressed as
sumproduct(A1:A10,B1:B10). Now you can set up solver with the contraints on
B1:B10 (integers, =0, <=1), and the objective of getting the cell with the
sumproduct equation to equal 300000.
Your final results will be the products of A1 and B1, A2 and B2, etc.
HTH. --Bruce

"Donna" wrote:

I have a series of values both positive and negative that I want to change so
that they add up as close as possible to a given value. For example 100000 +
200000 + +300000+ 80000+ -50000 + -250000 I want to change so that they add
up as close as possible to 300000.

The problem is that the only change in value of the cells I want to allow is
to change them to 0 and I am having trouble setting up the constraints to do
that.
I can see that the answer is to change the 80000 to zero to give me the
300000 but how can I get solver to do this?

Thanks, Donna

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble with Solver Wanderingspirit99 Excel Discussion (Misc queries) 0 September 12th 05 03:50 PM
Solver Janus Excel Discussion (Misc queries) 5 September 2nd 05 07:23 PM
Using Solver with VBA EggShell Excel Discussion (Misc queries) 2 August 22nd 05 07:06 AM
Solver problem nj125 Excel Discussion (Misc queries) 2 May 19th 05 05:19 AM
Freeze Pane problem in shared workbooks JM Excel Discussion (Misc queries) 1 February 1st 05 12:04 AM


All times are GMT +1. The time now is 05:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"