I have four columns
I want to find all combinations of numbers from each column that add up to an exact value. Is there a VBA script that can help me achieve this goal?
I am looking for an output like:
Let's say that I want the values to add up to 2721, then the code should return the combination as (1,3,6,7) i.e. the corresponding row of each column and so on until it finds all such combinations. If it is not able to find the exact sum then find the nearest sum to that value.