T O P I C R E V I E W |
Skaytex |
Posted - 02/12/2014 : 12:24:45 PM Origin Ver 8,6
Hello anyone knows how to add for loop to this csetvalue formula:
range r1=[r1]r1!2; range r2=[r2]r2!2; range r3=[r3]r3!2;
range st=[a]Sheet1!14; range rd=[a]Sheet1!13;
range r11=[r11]r11!2; range r12=[r12]r12!2;
csetvalue formula:="((r1*st[1]-r11*st[11])*4*1,38E-23*295*8191)/((r12*st[12]-r11*st[11])*rd[1]^2)" col:=2; csetvalue formula:="((r2*st[2]-r11*st[11])*4*1,38E-23*295*8191)/((r12*st[12]-r11*st[11])*rd[2]^2)" col:=3; csetvalue formula:="((r3*st[3]-r11*st[11])*4*1,38E-23*295*8191)/((r12*st[12]-r11*st[11])*rd[3]^2)" col:=4;
i want 3 or more times rewind this formula...
and is it possible to add for loop for this:
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;
KF |
1 L A T E S T R E P L I E S (Newest First) |
lkb0221 |
Posted - 02/12/2014 : 1:23:20 PM Hi, please try the following strcture
// 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. Zheng OriginLab |
|
|