Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
nealmjr
 
Posts: n/a
Default How can I determine the components of a sum?

If I have a table of numbers and a number that is supposed to be a sum of
selected numbers from the table (but not shown by formula), is there an Excel
formula or function that, given the total, will identify which numbers in the
table sum to the total I've been given?
  #2   Report Post  
Posted to microsoft.public.excel.misc
B. R.Ramachandran
 
Posts: n/a
Default How can I determine the components of a sum?

Hi,

Let's suppose that the list of numbers is in Column A (e.g., A2:A101).
Create Column B (i.e., B2:B101) by entering 1 in all cells.
Create Column C with the formula =A2*B2 entered in C2 and autofilled down to
C101.
Enter the target sum (the number that is supposed to be the sum of a subset
of numbers from the list) in D2.
In some cell, say E2, enter the formula, =SUM(C2:C101)-D2

Now you are going use "Solver" (under "Tools") for finding out the subset of
numbers that would make E2 equal to zero (Please note that the"Solver" add-in
should have been installed!)

"Tools" -- "Solver"--
"Set Target Cell" $E$2
"Equal to" check "Value of" and enter 0
"By Changing Cells" B2:B101 (this is the column containing '1's)
"Subject to the Constraints" -- click "Add" and in the pop-up bar enter the
formula,
B2:B101 (on the left-side), click on "<=" and select "bin" and click "OK"
(the constraint would read as B2:B101 = binary)
Click "Solve"

Solver would crunch numbers, change some of the '1's in Column B to '0's,
and after finding a solution if there is one, show a pop-up "Solver Results".
If the results are satisfactory click "Keep Solver Solution".
Please note that multiple solutions are possible for such problems, and
Solver would find one of those solutions.

Regards,
B. R. Ramachandran

"nealmjr" wrote:

If I have a table of numbers and a number that is supposed to be a sum of
selected numbers from the table (but not shown by formula), is there an Excel
formula or function that, given the total, will identify which numbers in the
table sum to the total I've been given?

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
How to determine total value of business for sale Margie Campbell Excel Worksheet Functions 0 February 19th 06 08:31 PM
how to determine blocks of time in a date range hydro1guy Excel Discussion (Misc queries) 4 December 9th 05 03:13 AM
How to determine second (and then third) highest value in a list Scott M. Lyon Excel Discussion (Misc queries) 2 September 12th 05 11:09 PM
How to determine second (and then third) highest value in a list Scott M. Lyon Excel Discussion (Misc queries) 4 September 12th 05 08:51 PM
formula to determine the first column containing any data sd Excel Worksheet Functions 5 November 9th 04 08:06 PM


All times are GMT +1. The time now is 04:15 PM.

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"