I want to fill in a matrix using VBA code with the following:
- Values x and y are two inputs to do a complex calculationIn this example say x=1 and it needs to increase with fixed value Xincrease (say 5) for a certain number of xsteps (say 4) and say y=1 and it needs to increase with fixed value yincrease (say 10) for a certain number of ystep (say 5)
- I want to upfront define values for x and y, for the increases for x and y and the number of steps (loops) for each x and y in separate cells somewhere else in the worksheet in the worksheet
Example of table below
Matrix.JPG
Now I want to populate the matrix using both the rows and columns as input values to another calculation
For example: Say I for example I want to Calculate X^2/y^3 (see result in Cell D4)
This calculation in the example is actually more complex (it runs in a separate worksheet as inputs for x and y) but this was just for illustration purposes
Bookmarks