+ Reply to Thread
Results 1 to 21 of 21

Can excel find the missing numbers for _+_=2 ?

  1. #1
    Registered User
    Join Date
    04-14-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    9

    Can excel find the missing numbers for _+_=2 ?

    Hello,

    I need excel to find the numbers missing in _+_=2 from a range of numbers.

    In other words, I have a specific value and I want excel to search through a range and find the cells that add up to my criteria.

    Your help would be very much appreciated!
    Last edited by NBVC; 04-21-2011 at 11:37 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Can excel find the missing numbers for _+_=2 ?

    Can you upload example with your input(s) and desired output?

  3. #3
    Registered User
    Join Date
    04-14-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Can excel find the missing numbers for _+_=2 ?

    Definitely zbor, here's an example of what I mean:

    Inputs
    Range
    A1. 1.00
    A2. 1.00

    Sum (criteria)
    2.00

    Output>> Cells A1 and A2
    Last edited by JohnPaulino; 04-14-2011 at 01:48 PM.

  4. #4
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: Can excel find the missing numbers for _+_=2 ?

    So...all wholes numbers

    Any and all whole numbers that can be summed to equal the target.

    Will your targets always be single digit numbers or not?
    Life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
    John Wright

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Can excel find the missing numbers for _+_=2 ?

    I ment more like do you have positive and negative numbers (like -3+5=2) or maybe decimal (like -0.5+2.5=2) etc.

  6. #6
    Registered User
    Join Date
    04-14-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Can excel find the missing numbers for _+_=2 ?

    The items in the range are $ currency, so the inputs are always in the form 0.00. The inputs might be $1,458.87..$5.09...$1,245,098.32. The numbers will always be positive or zero, but never negative.

    The target, or criteria, in the same fashion will always be a $ currency and never negative.

    Yes, any or all numbers in input can be summed to equal the criteria. For example, 1.00 + .50 + .50 = 2.00 etc...
    Last edited by JohnPaulino; 04-14-2011 at 02:14 PM.

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Can excel find the missing numbers for _+_=2 ?

    Maybe something like this:
    Attached Files Attached Files

  8. #8
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: Can excel find the missing numbers for _+_=2 ?

    @zbor,
    the RANDBETWEEN() function doesn't work in XL2003.


    EDIT: my bad...it was returning the #NAME on my machine.(I don't have the Analysis ToolPak add-in)
    Last edited by jwright650; 04-14-2011 at 02:20 PM. Reason: edited comment

  9. #9
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Can excel find the missing numbers for _+_=2 ?

    Yes, it's in the analysis addin I believe.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  10. #10
    Registered User
    Join Date
    04-14-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Can excel find the missing numbers for _+_=2 ?

    That's just about right, but the output is just Desired Value - Range Value. This would work if the Desired Value - Range Value equaled another item in the range.

    In other words, I'm looking for both numbers in the example _+_=2

  11. #11
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Can excel find the missing numbers for _+_=2 ?

    Okay but if the number you're summing to is 4 do you want returned
    1 + 3 and
    3 + 1 or just one or the other?

  12. #12
    Registered User
    Join Date
    04-14-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Can excel find the missing numbers for _+_=2 ?

    Chemist B,

    That's right, just one or the other. For 1+3 and 3+1, I just need one of them to come up

    The main issue is finding two values in the range ( which is a very large range ) that sum up to my specified criteria.

  13. #13
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Can excel find the missing numbers for _+_=2 ?

    And you want all possible combinations?

  14. #14
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Can excel find the missing numbers for _+_=2 ?

    Quote Originally Posted by JohnPaulino View Post
    That's just about right, but the output is just Desired Value - Range Value. This would work if the Desired Value - Range Value equaled another item in the range.

    In other words, I'm looking for both numbers in the example _+_=2
    Well, first number is in A column, and in B column is number if it's match. That would give you both numbers.

  15. #15
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Can excel find the missing numbers for _+_=2 ?

    If you only want a single answer, then (assuming your result is in C1)
    In A1
    =RANDBETWEEN(0,C1*100)/100
    In A2
    = C1-A1

  16. #16
    Registered User
    Join Date
    04-14-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Can excel find the missing numbers for _+_=2 ?

    @zbor

    Maybe I didn't see, but does the number in Column B exist in Column A? If it does, then that's exactly what I'm looking for. And also if it does, can the output indicate which cell of Column A that the numerical output of Column B matches with?

  17. #17
    Registered User
    Join Date
    04-14-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Can excel find the missing numbers for _+_=2 ?

    And yes, all possible combinations.

  18. #18
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Can excel find the missing numbers for _+_=2 ?

    Yes, it exist. That's what MATCH part of formula do.

    And other part, is this it:
    Attached Files Attached Files
    Last edited by zbor; 04-14-2011 at 02:57 PM.

  19. #19
    Registered User
    Join Date
    04-14-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Can excel find the missing numbers for _+_=2 ?

    Yes that's exactly it!

    I found one small error, It seems there is a discrepancy of two cells in the C column. I'll use one example from the sheet you sent me.

    There is an output of $7.00 in B12, and the corresponding output cell in Column C is A148. However, the output cell should be A150.
    The same is true when you go to B150, output of 3.00. The corresponding output cell is A10, when it should really be A12.

  20. #20
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Can excel find the missing numbers for _+_=2 ?

    I see difference is for 2... Then I've probably take wrong starting reference. Put A:A instead

  21. #21
    Registered User
    Join Date
    04-14-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Can excel find the missing numbers for _+_=2 ?

    Thank you zbor for you help! That was very smart.

+ 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