| T O P I C    R E V I E W | 
              
                | SMOrigin | Posted - 03/07/2014 : 09:41:23 AM How can one copy every 8th column from multiple worksheets into single worksheet. For example, I have 200 worksheets named Dft(1), Dft(2)......... and I want to copy every 8th column named as S1 from  the 200 worksheets into a new worksheet.
 | 
              
                | 5   L A T E S T    R E P L I E S    (Newest First) | 
              
                | miheico | Posted - 04/22/2014 : 04:55:37 AM Thank you, lkb0221. But I have a problem. My numeration of workbooks isn't fitting to the script. They are numerated from  AQ0001 and up to AQ2000.
 The script can't catch names.
 
 I found how to do that. I just used specifier like: [AQ$(ii, #4)]1!7. Now it works very nice.
 Thanks a lot!
 
 | 
              
                | lkb0221 | Posted - 04/21/2014 : 5:19:12 PM Hi,
 
 First, prepare a new workbook to place those 7th columns. In the following example script, "Result" is the target workbook.
 //Script Start
 loop(ii,1,2000) // loop form 1 to 2000
 {
 range r1 = [AQ$(ii)]1!7; // point to the (ii)th wks.
 range r2 = [Result]1!$(ii); // point to the (ii)th column in the result wks.
 colcopy irng:=r1 orng:=r2; // Copy this column over.
 }
 //Script End
 
 Zheng
 OriginLab
 | 
              
                | miheico | Posted - 04/19/2014 : 4:35:09 PM Hi!
 I have a similar question. For example: I have a 2000 workbooks named AQ1 and up to AQ2000 and just with one worksheet. And I need to copy each 7-th column from all 2000 workbooks to the new workbook. How can I do that?
 
 Thanks a lot!!
 | 
              
                | SMOrigin | Posted - 03/08/2014 : 02:38:25 AM It works, although it inserts a space after every column. But it can be sorted out in excel afterwards. Thanks a ton, Zahraa.
 | 
              
                | zahraa | Posted - 03/07/2014 : 4:59:05 PM Dear S M,
 
 You can try the following script in Script Window:
 
 doc -e LB {colcopy irng:=col(8) orng:=[Book2]Sheet201!Col(nn) data:=1 lname:=1 units:=1 comments:=1 para:=1;
 }
 
 
 Please put in the name of the workbook all your worksheets are in where it says Book2 in the script. Once it has finished running, a dialog will appear asking you to specify the destination columns but you can just close that. This should input the data in every 8th column into a newly created worksheet 201 in your present workbook along with the Long Name Units, Comments and Parameters of the eighth columns.
 Hope this helps
 |