Author |
Topic  |
|
shinkei
USA
1 Posts |
Posted - 03/25/2011 : 6:31:15 PM
|
Origin Ver. and Service Release (Origin 7.5 SR6): Operating System: Windows7 64-bit
The following code will let me copy values from worksheets "Data1" and "Data2", to "Data3": (1)looping across the worksheets, (2)then across columns in triplicate in each worksheet, (3)and then finally copying values, from 3 columns at a time on row#12, to Data3 starting with row#1, columns 2,3,4.
start=1; %L="Data3"; loop(ww,1,2){ %K = "Data$(ww)"; for(ii=2;ii<17;ii+=3){ kk=ii; for(jj=3;jj<15;jj++){ %(%L,jj,start) = %(%K,kk,12);kk++;}; start++; }}
However, this code will place succeeding values in Data3 down rows instead of looping across columns. There are 5 groups of triplicates each in Data1 and Data2. I want to copy the 5 groups into a series of 5 rows in Data3; Data1 and Data2 should each have their own 5 rows - each should have separate triplicate columns in Data3.
How can this be modified?
thanks Ginny
|
|
larry_lan
China
Posts |
Posted - 04/02/2011 : 04:49:41 AM
|
There must be some logic mistakes. I am not quite sure your requirement yet. I think you can debug your script by yourself. For example, type jj, kk and start inside for loop to see which cell you are working on.
Thanks Larry |
Edited by - larry_lan on 04/02/2011 04:50:05 AM |
 |
|
|
Topic  |
|
|
|