Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Excel Solver / Math Problem

I have a general ledger account that is out of a balance. Auditors tomorrow
will force a large write off or other fines if this account is not
reconciled. In order to find where the account is off I am trying to solve
mathematically where it is right. Large wire transfers (credits) are made of
many debits but I dont know which debits are making up the wire transfers.
In other words, I have a number X and some grouping of other numbers equals
X.

I set up an excel solver model that that attempts to test every combination
by using binary €śswitches€ť. The numbers 0 or 1 multiply by each test value
to give either 0 or the value itself. All of these result values are added
up and if the resulting sum matches number X then we found are match. The
problem is the Excel solver model is not really solving using a binary
method. It is testing all values from 0 to 1 and telling me if I get a
solution that meets the binary constraints.

Here is small sample data table and the constraints:
Changing cells: B2:B6
Constraint: Difference = 0
Constraint: B2:B6 = binary

Test Values Binary # Result
$456,136.59 1 $456,136.59
$456,136.59 1 $456,136.59
$197,181.09 0 $0.00
$195,487.11 1 $195,487.11
$521,298.96 0 $0.00
$130,324.74 0.0002 $31,767.42
$65,162.37 0.25047 $16,321.22
$390,974.22 0.30657 $119,862.06
$252,198.01 0.231078 $58,277.46

Sum of Results: $1,333,988.45

Number X: 3,359,333

Difference (Target of zero): ($2,025,344.55)


What is the fastest way to setup a solution in Excel or custom programming
(I can program C#,VBA) to solve this problem?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Excel Solver / Math Problem

You are almost the

You need three constraints on the B's

1. they must be int
2. they must be = 0
3. they must be =<1
--
Gary''s Student
gsnu200712

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 947
Default Excel Solver / Math Problem

Hi. A Binary Constraint that ends up being 0.3065 usually indicates
that Solver aborted early because it got confused, and gave up.
For this type of problem, the usually technique is to set B1:B6 as
binary constraints as you did.

The third column is usually not used. The Sum formula is
=Sumproduct (A1:A6, B1:B6)

The Target Cell is as you have done.

The Target Cell will almost never be Zero.
So, one usually minimizes the Target Cell with the constraint that
Target Cell = -.005 (or something similar close to zero depending on
what you are doing)

You should also adjust Solver's options for Precision, Tolerance, and
Convergence.

HTH
Dana DeLouis


On Wed, 28 Mar 2007 17:08:05 -0700, denton
wrote:

I have a general ledger account that is out of a balance. Auditors tomorrow
will force a large write off or other fines if this account is not
reconciled. In order to find where the account is off I am trying to solve
mathematically where it is right. Large wire transfers (credits) are made of
many debits but I don’t know which debits are making up the wire transfers.
In other words, I have a number X and some grouping of other numbers equals
X.

I set up an excel solver model that that attempts to test every combination
by using binary “switches”. The numbers 0 or 1 multiply by each test value
to give either 0 or the value itself. All of these result values are added
up and if the resulting sum matches number X then we found are match. The
problem is the Excel solver model is not really solving using a binary
method. It is testing all values from 0 to 1 and telling me if I get a
solution that meets the binary constraints.

Here is small sample data table and the constraints:
Changing cells: B2:B6
Constraint: Difference = 0
Constraint: B2:B6 = binary

Test Values Binary # Result
$456,136.59 1 $456,136.59
$456,136.59 1 $456,136.59
$197,181.09 0 $0.00
$195,487.11 1 $195,487.11
$521,298.96 0 $0.00
$130,324.74 0.0002 $31,767.42
$65,162.37 0.25047 $16,321.22
$390,974.22 0.30657 $119,862.06
$252,198.01 0.231078 $58,277.46

Sum of Results: $1,333,988.45

Number X: 3,359,333

Difference (Target of zero): ($2,025,344.55)


What is the fastest way to setup a solution in Excel or custom programming
(I can program C#,VBA) to solve this problem?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,071
Default Excel Solver / Math Problem

This is probably too late to help you if you haven't already solved your
problem...

You are on the right track. The approach Solver uses is a 'standard' one
for problems with binary variables. Unfortunately, the default version of
Solver has some limits on the size of the problem it can solve.

For a Solver based template or for VBA code that lists all (or as many as
desired) combinations, see
Find a set of amounts that match a target value
http://www.tushar-mehta.com/excel/te...ues/index.html

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article , denton120
@yahoo.com says...
I have a general ledger account that is out of a balance. Auditors tomorrow
will force a large write off or other fines if this account is not
reconciled. In order to find where the account is off I am trying to solve
mathematically where it is right. Large wire transfers (credits) are made of
many debits but I don=3F=3Ft know which debits are making up the wire transfers.
In other words, I have a number X and some grouping of other numbers equals
X.

I set up an excel solver model that that attempts to test every combination
by using binary =3F=3Fswitches=3Fť. The numbers 0 or 1 multiply by each test value
to give either 0 or the value itself. All of these result values are added
up and if the resulting sum matches number X then we found are match. The
problem is the Excel solver model is not really solving using a binary
method. It is testing all values from 0 to 1 and telling me if I get a
solution that meets the binary constraints.

Here is small sample data table and the constraints:
Changing cells: B2:B6
Constraint: Difference = 0
Constraint: B2:B6 = binary

Test Values Binary # Result
$456,136.59 1 $456,136.59
$456,136.59 1 $456,136.59
$197,181.09 0 $0.00
$195,487.11 1 $195,487.11
$521,298.96 0 $0.00
$130,324.74 0.0002 $31,767.42
$65,162.37 0.25047 $16,321.22
$390,974.22 0.30657 $119,862.06
$252,198.01 0.231078 $58,277.46

Sum of Results: $1,333,988.45

Number X: 3,359,333

Difference (Target of zero): ($2,025,344.55)


What is the fastest way to setup a solution in Excel or custom programming
(I can program C#,VBA) to solve this problem?


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
More math than excel, but a fun problem S Davis Excel Worksheet Functions 4 July 6th 06 10:04 PM
Excel Math problem Djbaker70 Excel Worksheet Functions 1 March 24th 06 06:08 PM
I have a math problem in Excel. Djbaker70 Excel Discussion (Misc queries) 2 March 23rd 06 11:55 PM
Interesting Solver problem (Solver encounters an error) MrShorty Excel Discussion (Misc queries) 3 December 22nd 05 10:52 PM
math problem Keven Excel Worksheet Functions 2 July 29th 05 04:56 PM


All times are GMT +1. The time now is 02:34 PM.

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

About Us

"It's about Microsoft Excel"