# Excel Stumper.

**URL:** <https://boards.straightdope.com/t/excel-stumper/455036>\
**Category:** Factual Questions\
**Created:** [July 2, 2008, 1:28pm UTC](https://boards.straightdope.com/t/excel-stumper/455036 "2008-07-02T13:28:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![brewha](https://avatars.discourse-cdn.com/v4/letter/b/91b2a8/32.png) [@brewha](https://boards.straightdope.com/u/brewha)\
**Post date:** [July 2, 2008, 1:28pm UTC](https://boards.straightdope.com/t/excel-stumper/455036/1 "2008-07-02T13:28:54Z")

</div>

I fancy myself pretty Excell savvy, but this one is a stumper for me. I mean I could do it, but the amount of programming involved would be more work than it’s worth. I’m looking for a more elegant solution. Here’s the issue.

There’s a column of numbers - say 200 entries. You know that a handful of these entries add up to a known number. Is there a way to determine which entries they are?

---

<div class="post-metadata">

**Author:** ![Whack-a-Mole](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/whack-a-mole/32/141_2.png) [@Whack-a-Mole](https://boards.straightdope.com/u/Whack-a-Mole)\
**Post date:** [July 2, 2008, 1:32pm UTC](https://boards.straightdope.com/t/excel-stumper/455036/2 "2008-07-02T13:32:49Z")

</div>

I am no Excel guru but your issue sounds like it could be handled by the Solver add-in:

> [@](#):
>
> The first step in using the Solver command is to build a Solver-friendly worksheet. This involves creating a target cell to be the goal of your problem—for example, a formula that calculates total revenue—and assigning one or more variable cells that the Solver can change to reach your goal.
> 
> SOURCE: [Your request has been blocked. This could be due to several reasons.](http://office.microsoft.com/en-us/excel/HA011118641033.aspx)

---

<div class="post-metadata">

**Author:** ![Giles](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/giles/32/60_2.png) [@Giles](https://boards.straightdope.com/u/Giles)\
**Post date:** [July 2, 2008, 1:45pm UTC](https://boards.straightdope.com/t/excel-stumper/455036/3 "2008-07-02T13:45:37Z")

</div>

Without further limits, this might be hard to solve, since there are 2^200 different sums, which is a 61 digit number in decimal notation. However, if there are some limits on the 200 numbers, it might be easier. For example, if they are all positive, you may not have to examine a large number of possibilities.

---

<div class="post-metadata">

**Author:** ![Kyrie\_Eleison](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/kyrie_eleison/32/7682_2.png) [@Kyrie\_Eleison](https://boards.straightdope.com/u/Kyrie_Eleison)\
**Post date:** [July 2, 2008, 4:59pm UTC](https://boards.straightdope.com/t/excel-stumper/455036/4 "2008-07-02T16:59:10Z")

</div>

I can offer no help solving this within Excel, but it’s probably worth noting that you’re asking about solving a special case of [the knapsack problem](http://en.wikipedia.org/wiki/Knapsack_problem).
