I have a code in VBA
Please Login or Register  to view this content.
t is for time
x is a number of variables
dt is the time step

So in the worksheet I have to enter the above formula in a cell, press enter and then select 2 more adjacent cells and then to press shift+ctrl+enter to enter it in 3 cells simultaneously as an array formula. This can be dragged to fill in the remaining timestep cells as follows:

Please Login or Register  to view this content.
However I want to program the above in VBA without having to do all the timesteps. For example if I want to know the result for t=45, I don't need to go through 0 to 45 by step of 0.5 in each cell, all I want is t = 45 in just the 3 cells. My attempt at the code follows:
Please Login or Register  to view this content.