vba - Printing loop values to cells with step size less than 1 -


i able print out values of each loop iteration when step size 1. there way can same smaller step sizes? code below have been using when step size 1

for = 1 height - 1     moment = ((load * i) / (3 * (height ^ 2)) * ((height ^ 2) - (i ^ 2)))     application.calculate     sheet2.range("a" & i).value =     sheet2.range("b" & i).value = moment next 

i suppose flagged "easily google-able" can modify the loop step [increment]:

 dim k int      k = 1  = 1 height - 1 step 0.1      moment = ((load * i) / (3 * (height ^ 2)) * ((height ^ 2) - (i ^ 2)))      application.calculate      sheet2.range("a" & k).value =      sheet2.range("b" & k).value = moment      k = k + 1 next 

Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -