The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Copying multiple cells from a column to another
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

bvg15

6 Posts

Posted - 10/26/2015 :  11:37:52 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8
Operating System: Win 7

Hello,

I am trying to copy data from multiple cells of two different columns and export into two other columns in the same worksheet. For example, I want to copy data from specific rows for column 15 (and 17) and extract to columns 19 (and 20), respectively

copy from | export to
col15/col17 | col19/col20
row 1 | row1
row 16 | row2
row 31 | row3
row 46 | etc.
.
.
.
row 151

Also, I would like to run this on several worksheets at the same time. For this, I plan to use the doc -e command.

Thanks for your help.

Liamn

19 Posts

Posted - 10/27/2015 :  02:58:39 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi, I think you can try the following 2 lines in LabTalk:

wreducerows irng:=col(15) nrows:=14 start:=2 orng:=col(19);
wreducerows irng:=col(17) nrows:=14 start:=2 orng:=col(20);


-Edit-
Sorry... didn't notice you use O8. Perhaps wreducerows does not exist in O8. You can use "reduce" instead:

reduce irng:=col(15) num:=15 method:=minrow orng:=col(19);
reduce irng:=col(17) num:=15 method:=minrow orng:=col(20);

Edited by - Liamn on 10/27/2015 03:12:12 AM
Go to Top of Page

bvg15

6 Posts

Posted - 10/27/2015 :  2:45:13 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you, it works. I have to do the same operation for rows 8,23,38,etc. and so on. Instead of deleting the previous 7 (or as needed)rows for each operation so I can make now my row 8 (or as needed)first such that the script works, is there a command to include in the script to remove lines as necessary? Thanks.
Go to Top of Page

Liamn

19 Posts

Posted - 10/27/2015 :  11:08:28 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Sure, you can change "irng:=col(15)" to "irng:=col(15)[8:end]".
Go to Top of Page

bvg15

6 Posts

Posted - 12/10/2015 :  1:51:48 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you, Liamn. I appreciate your help.
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000