+ Reply to Thread
Results 1 to 2 of 2

Please Help with Summing

  1. #1
    Registered User
    Join Date
    02-10-2006
    Posts
    2

    Please Help with Summing

    I have a large list of data, and certain subtotals.

    Is there any way to have excel calculate which combination(s) of the data sum to form a subtotal? This is really important, and if anyone could help I would appreciate it!

  2. #2
    Gary''s Student
    Guest

    RE: Please Help with Summing

    Use walking ones to generate the combinations:

    For example, you have five items: 1,3,5,7,11 and you want to know which
    sub-set will add up to 24.

    In A1 put:
    =ROW()
    in B1 put:
    =DEC2BIN(A1,5)

    and copy down thru row 31. In C1 thru G1 put:
    =(LEFT(B1,1))*1
    =(MID(B1,2,1))*1
    =(MID(B1,3,1))*1
    =(MID(B1,4,1))*1
    =(RIGHT(B1))*1 and also copy down thru row 31

    In H1 thru L1 put your data:
    1, 3, 5, 7, 11 and copy down

    In K1 put:
    =SUMPRODUCT(C1:G1,H1:L1) and copy down

    Look for the 24 and get your sub-set.



    --
    Gary''s Student


    "mrharlow" wrote:

    >
    > I have a large list of data, and certain subtotals.
    >
    > Is there any way to have excel calculate which combination(s) of the
    > data sum to form a subtotal? This is really important, and if anyone
    > could help I would appreciate it!
    >
    >
    > --
    > mrharlow
    > ------------------------------------------------------------------------
    > mrharlow's Profile: http://www.excelforum.com/member.php...o&userid=31423
    > View this thread: http://www.excelforum.com/showthread...hreadid=511256
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1