range r1=[r1]r1!2; range r2=[r2]r2!2; range r3=[r3]r3!2; range r4=[r4]r4!2; range r5=[r5]r5!2; range r6=[r6]r6!2; range r7=[r7]r7!2; range r8=[r8]r8!2; range r9=[r9]r9!2; range r10=[r10]r10!2; range r11=[r11]r11!2; range r12=[r12]r12!2;
// range st=[a]Sheet1!14; range rd=[a]Sheet1!13; range r11=[r11]r11!2; range r12=[r12]r12!2; // Declare the variables that will not change in the loop loop(ii,1,10) // loop from 1 to 10 { range rr = [r$(ii)]r$(ii)!2; csetvalue formula:="((rr*st[$(ii)]-r11*st[11])*4*1.38E-23*295*8191)/((r12*st[12]-r11*st[11])*rd[3]^2)" col:=$(ii+1); } //
Notice that I changed the decimal separator from comma to dot in "...st[11])*4*1.38E-23*295..." because of my settings.