Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Which records combine to arrive at a given total? 1

Status
Not open for further replies.

NevB

Technical User
Sep 13, 2001
3
GB
I have about 50 records with a single value field each.
I want to identify which records add up to a given total. There may or may not be a unique combination.
In this example the total of the value fields is 100,857
I know there is at least one subset of those records that adds up to 90,187. How can I identify what possible subsets fit?
Any ideas? Am I being thick?
 
Do any of the numbers have an unique identifier?? For example:

Value Identifier
12 A
12 A
76 B
33 C
4 B

If they do have something like above, then you can add up all instances of A (24), B (80) and C (33), using a function within Excel called Conditional Sum. This is an add-in, but works really well.
 
Dear Hasit

Column A contains unique names, column B has numbers. I don't think your suggestion works. But thanks for replying. Any more suggestions welcome.
 
NevB,

Sorry about that! My only question would be how do you identify specific records that would need to be added up? There must be a way to do that otherwise it would be an impossibility to add up specific records.

One other way to do it is to use conditional sum AND conditional format, which allows you to activate a formula based on a value in a cell. So the forth column could look for a character in the third column (that you put in), which then activates the conditional sum, from which you get a total for only those records that you have identified as needing to be added up.

This is cumbersome if you have thousands of records, but would be workable for a smaller number.
 
Hasit

Thanks, but I do not think you understand what I need to do:
My problem is that I do not know which records I want to add up. ie I want to find out which combination(s) of records do add up to the figure given.

NevB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top