-
Help with equation that has several inputs which vary in value.
Hi,
I have an equation in VBA as follows:
answer = A * B * C * ((1 - D) ^ (3 / 2) * (1 + E * (1 - F) ^ 3) / G ^ 2)
where A, B, D, E, F & G are defined in a worksheet and are brought in using Worksheets(1).Range("B2") for example. This works fine for the purpose.
However, C and G both have minimum and maximum values. I wish to input them incrementally into the above equation.
For example:
Cmin = 0, Cmax = 6, Increment = 2. Here I have 4 inputs (0, 2, 4, 6)
Gmin = 0, Gmax = 3, Increment = 1. Here I have 4 inputs (0, 1, 2, 3)
This means I will have 16 different solutions to the problem.
I could set up the equation 16 times, but this is not efficient.
How can I incorporate some function, maybe some sort of matrix perhaps, so that running the equation once will result in 16 answers being produced.
Any tips, pointers etc will be much appreciated.
Best Regards,
ITY
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules