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
 help with simple script please
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

rosei09

2 Posts

Posted - 11/21/2009 :  9:25:07 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I am a long time user of Origin (now using ver 8) but am unfamiliar with scripts (or LabTalk, or C++, or etc). Could someone do me the great favor of writing for me a very simple script (that I can paste into the "worksheet script" box). All I want to do is take all the values in column A and multiply them by a number (such as 3.5), all the values in column B and multiply them by the SAME number, and so on for every column in the worksheet. (I don't want to normalize the columns, just do the same simple multiplication on all the values in every column.) Each column has 1024 values, if you need to know this.

Obviously I know I can do this for a single column by right-clicking on it and using the arithmetic under "set column values" But, obviously, I don't want to do this 100+ times over individually for 100+ columns in my worksheet. It's got to be a trivial script, isn't it?

Thank you for your help,
rosei

cpyang

USA
1406 Posts

Posted - 11/22/2009 :  08:15:56 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Here


loop(i,1,wks.ncols) {wcol(i)*=3.5;}


You can read more here

http://wiki.originlab.com/~originla/wiki/index.php?title=LabTalk:Manipulating_Worksheet_Columns

CP
Go to Top of Page

rosei09

2 Posts

Posted - 11/22/2009 :  7:53:38 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply

Thank you! (How embarrassing to ask for something so simple.)
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 11/22/2009 :  8:09:31 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
not embarrassing at all, and many others would benifit from your question, as for a new Origin user, the initial questions are often about very simple task but not knowing where to get started.

CP
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