I have a number on a spreadsheet which is a combination of many different numbers on a list.
For example:
A list contains: 100, 200, 250, 500, and 1000
The number I need to explain is: 800
The answer would be 500, 200, 100.
I'm dealing with over 1500 currency cells ($xxxx.xx) which make a total (and not all are used, so SUM
is useless). I need to understand which numbers were used to create that total (Which isn't a formula, it's a hard-coded number).
THE QUESTION:
Is there a function or VBA that will systematically combine numbers in a given range until it determines which numbers can be added together to make the total?
I want to know before I start writing a brute-force algorithm.