Forum Discussion
Finding Possible Matches to a Solution
mathetes In reality, this is related to a problem I frequently face when preparing financials for a company. I am typically faced with a discrepancy on the company's books of a certain amount and am presented with a list of maybe 30 to 40 transactions that may have had their amounts adjusted in the last month. I need to cipher through those transactions to find which combination of them makes up a sum equal to the discrepancy as this will help me identify the source of the discrepancy.
In response to your questions, you are correct in assuming that this is just a simplified model to reflect the real world application. The actual numbers can be anything. Using a factor of 5 was just the simplest way I could think to replicate the problem at hand.
A number should not be used more than once in the proposed solution unless that number appears on the list of possible options to the solution (column A in my example) multiple times, which could potentially happen.
- mathetesOct 02, 2025Silver Contributor
Thank you for giving that more complete description. I assume that the solutions proposed by Patrick2788 and SergeiBaklan will meet your need.