Link to home
Start Free TrialLog in
Avatar of Clif
ClifFlag for United States of America

asked on

Finding Items That Add Up To A Certain Number

Ok, I doubt if there is an answer that works, but what the heck, I might as well ask anyway.

I have a column of numbers (see below).  The sum of those numbers equals 1943.37, the problem is the sum is different that what I'm expecting (1373.29).  So, I need to find out which combination of numbers equals the difference so that I can remove them from the list.  It would be easy if there was a single entry of 570.08, or even two numbers that total 570.08.  But it's not that easy.

Is there any code y'all know of that would perform such a deed, that is figure out which two or more items equal a given number (and preferably highlight them somehow)?

In case you're curious, this is a real world need.  The numbers are in our GL account and are 570.08 off from what we're supposed to have, so someone entered values in the wrong GL account.  I need to find out which values they are so I can reassign them.

 12.00
-12.00
 21.34
 30.00
 64.75
 65.36
 78.00
 82.49
106.77
109.67
163.40
184.74
306.95
337.06
392.84

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of leptonka
leptonka
Flag of Hungary image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Clif

ASKER

I don't know what surprises me more.  The fact that such a routine exists, or how fast the answer was provided.

Thanks much.  :-)
Avatar of baadayakazi
baadayakazi

I get the following error when I try this. What is required other than Excel? I'm using Excel for Mac 2016 MacUser generated image