If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Excel- Find a value or values within a range that add to a number

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-22-06, 12:24
Javi767 Javi767 is offline
Registered User
 
Join Date: Dec 2006
Posts: 2
Excel- Find a value or values within a range that add to a number

I am trying to find a formula that will give me the cells that add up to a given value. Think of a reconciliation process in which you are off by x amount and x can be the sum of multiple cells positive and negative. Is there an easy way or a formula that can help with that?
Reply With Quote
  #2 (permalink)  
Old 12-27-06, 15:21
savbill savbill is offline
Registered User
 
Join Date: Feb 2004
Posts: 533
Quote:
Originally Posted by Javi767
I am trying to find a formula that will give me the cells that add up to a given value. Think of a reconciliation process in which you are off by x amount and x can be the sum of multiple cells positive and negative. Is there an easy way or a formula that can help with that?
I don't know of a single formula to perform that action. If you had 100 cells of values there could be multiple combinations of cells with numbers that give the same answer. If you wanted, you could think it through and come up with some type of algorithm.
__________________
~

Bill
Reply With Quote
  #3 (permalink)  
Old 12-28-06, 15:36
shades shades is offline
Registered User
 
Join Date: Oct 2003
Posts: 1,091
Howdy. One possibility is to use Goal Seek (Analysis ToolPak). But it would take some planning to do so.

If I were to attempt this, I might consider using VBA instead of an Excel-function/formula approach.
__________________
old, slow, and confused
but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3/28/2008)

How to ask a question on forums
Reply With Quote
  #4 (permalink)  
Old 01-01-07, 21:44
Fazza Fazza is offline
Registered User
 
Join Date: Feb 2006
Posts: 113
There is no easy way and no formula. VBA will be required. The best solution I saw - too long ago now to remember where - used recursion. It was only a dozen or two lines of code and worked quickly and very well. It was limited to about 2 dozen input values however, 'cause after that it took 'forever'. HTH
Reply With Quote
  #5 (permalink)  
Old 01-09-07, 09:43
shades shades is offline
Registered User
 
Join Date: Oct 2003
Posts: 1,091
Tushar Mehta has just posted a template that does this very thing:
__________________
old, slow, and confused
but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3/28/2008)

How to ask a question on forums
Reply With Quote
  #6 (permalink)  
Old 02-03-07, 13:51
Javi767 Javi767 is offline
Registered User
 
Join Date: Dec 2006
Posts: 2
Thanks!

Thank you all for your response, the template really helps!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On