Last Edited By **Krjb Donovan** **Last Updated:** Mar 05, 2014 09:19 PM GMT

it is possible for VBA/formula do the calculation ? if can, how?

Assume Given a set of random numbers and a total,and VBA will calculate what combination of numbers from that set will sum to the total

e.g) A_no + B_no + c_no + d_no = total

VBA and formula both can calculate numbers.

In formula, you can see the calculation. If you have A_no in cell a1 B_no cell a2 and c_no in a3 and d_no in cell a4, then a formula like these in a5 will add all them up:

=a1+a2+a3+a4

or

=sum(a1:a4)

In VBA, all you do is declare variables, assign values using the cell positions and add the formula between lines of code to do the sum.

Mark

it is possible for VBA/formula do the calculation ?

Assume Given a set of random numbers and a total,and VBA will calculate what combination of numbers from that set will sum to the total

e.g) A_no + B_no + c_no + d_no = total

Kenny

I am guessing that VBA can solve the problem for you, but I am not a VBA expert. I suggest you reask the question of another allexperts person, Check the resumes for someone who is a VBA expert, I'm sure you can get a good answer. Sorry I couldn't be of more help.

Advertisement

©2024 eLuminary LLC. All rights reserved.