[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 74
  • Last Modified:

Find numbers in a list that equal a specified number

I have a list of numbers in Excel (for Mac) that add up to a specific number, but I'm not sure which numbers equal that number. How do I isolate the numbers in the list that add up to the specific number?
0
baadayakazi
Asked:
baadayakazi
  • 5
  • 3
1 Solution
 
Martin LissRetired ProgrammerCommented:
Depending on the list length you might have more than one combination. Also with anything but a very short list it would probably take some time to check all the combinations, which if I remember my math, if the were 15 numbers there would be 15 x 14 x 13 x 12 x etc numbers to check. My calculator tells me that that's 1.3 trillion combinations!
0
 
baadayakaziAuthor Commented:
I've seen a few solutions (including this one on EE). But none seem to work.
0
 
Martin LissRetired ProgrammerCommented:
How many numbers are we talking about?
Will the total always be the sum of the same number of numbers?
0
NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

 
baadayakaziAuthor Commented:
Approx 100 numbers. Its for a list of transactions that ended up on a report with a total - the total came from some subset of those 100 numbers. I need to run this a few different times.
0
 
Martin LissRetired ProgrammerCommented:
I haven't gotten it to work yet but from what I read, you can use the Solver add-in to do what you want.
0
 
baadayakaziAuthor Commented:
I couldn't get the solver to work either for some reason.
0
 
Martin LissRetired ProgrammerCommented:
I found an example on the web that works it's in the attached workbook where I wanted to find the numbers that added to 24. Solver changed column B to 1 for the numbers that added to 24 (there's at least one other solution). I'm going to try to post a picture of the web page because EE doesn't like me posting "blind links".
28975810.xlsx
0
 
Martin LissRetired ProgrammerCommented:
BTW the site says
Using more than 20 values (Column A) is not recommended unless you have a lot of spare time.
0

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now