Hello,
still need help, so I post some pictures:
an example for my table (regular with a lot of more columns)
code only for col(B)
for(ii=2; ii<=wks.maxrows; ii++)
{
range rd = [book2]sheet1!col(A)
a=(col(A)[$(ii)]-col(A)[$(ii-1)]);
b= (col(B)[$(ii)]-col(B)[$(ii)-1]);
rd[$(ii)]=a+b;
}
code only for col(C)
{
range rd = [book2]sheet1!col(B)
a=(col(A)[$(ii)]-col(A)[$(ii-1)]);
b= (col(C)[$(ii)]-col(C)[$(ii)-1]);
rd[$(ii)]=a+b;
}
...
the result in book2:
because I need it for more columns I tried your one:
my simplified code in your style
for(ii=2; ii<=wks.maxrows; ii++)
{
range rd = [book2]sheet1!col($(ii-1))
a=(col(A)[$(ii)]-col(A)[$(ii-1)]);
b= (col($(ii))[$(ii)]-col($(ii))[$(ii)-1]);
rd[$(ii)]=a+b;
}
the result:
I dont want a diagonal :-/
I think the loop change the column after every calculation "a+b" but I need to change it only if one column is calculated.
And on the pages I could not find the right solution :-/