+ Reply to Thread
Results 1 to 8 of 8

Finding a Specific Sum in a List of Numbers

  1. #1
    Registered User
    Join Date
    08-25-2008
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    80

    Finding a Specific Sum in a List of Numbers

    I have a list of 111 rows, each one containing different information, including a dollar amount. I also have a number that some (but not all) of those dollar amounts total to. Is there a macro, or some other way, that can automatically search through the numbers to see if any of them total the number I enter? I would also like it to remove duplicate amounts that total 0, for example $1,000 and ($1,000).

    I've attached an example.

    The main thing I am trying to accomplish is to weed out the duplicate amounts (where one is positive and one is negative), and use the remaining amounts to see if any of them total a certain number, in this example it is the highlighted number in row 116 (256,227.00).

    Let me know if I can provide you with any other information that may help. Thanks for looking!
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    01-20-2012
    Location
    New Jersey
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Finding a Specific Sum in a List of Numbers

    I didn't look at your spreadsheet, but you can always check for a match like this

    Please Login or Register  to view this content.
    if you want to get fancy: =if(countif(A:A, B1)>0, "Yes, at least one match", "Nope, there is no match")

  3. #3
    Valued Forum Contributor
    Join Date
    07-29-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003/Excel 2010
    Posts
    534

    Re: Finding a Specific Sum in a List of Numbers

    Using helper columns and Solver, i got this result:
    Attached Files Attached Files
    Last edited by WHER; 02-02-2012 at 07:37 PM.

  4. #4
    Registered User
    Join Date
    08-25-2008
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    80

    Re: Finding a Specific Sum in a List of Numbers

    Quote Originally Posted by WHER View Post
    Using helper columns and Solver, i got this result:
    Thank you very much Wher. Is there anything that can be done to see if any of them add up to the opposite of the number? So in this sheet, it would search for numbers that total 256,227 instead of (256,227)?

    Thanks again!

  5. #5
    Valued Forum Contributor
    Join Date
    07-29-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003/Excel 2010
    Posts
    534

    Re: Finding a Specific Sum in a List of Numbers

    I reconfigured Solver to look for a total of 256,227; it ran for several minutes but couldn't find a solution.

  6. #6
    Registered User
    Join Date
    08-25-2008
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    80

    Re: Finding a Specific Sum in a List of Numbers

    Quote Originally Posted by WHER View Post
    I reconfigured Solver to look for a total of 256,227; it ran for several minutes but couldn't find a solution.
    Thanks again Wher. Could you possibly tell me how to do this on my own? I have numerous other spreadsheets I would like to try it on. I assume it is more than just copying and pasting the formulas.

  7. #7
    Valued Forum Contributor
    Join Date
    07-29-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003/Excel 2010
    Posts
    534

    Re: Finding a Specific Sum in a List of Numbers

    The attachment in post #3 is modified (explanations added)

  8. #8
    Registered User
    Join Date
    08-25-2008
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    80

    Re: Finding a Specific Sum in a List of Numbers

    Quote Originally Posted by WHER View Post
    The attachment in post #3 is modified (explanations added)
    Thank you WHER, I appreciate you going out of your way to lay it all out for me. I wish I could rep you again!

+ 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