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
 "set column values" for only one in two columns
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

lenfant

France
Posts

Posted - 06/09/2017 :  05:03:18 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,
How to apply automatically a same function on columns in a worksheet, but only for the columns 1,3,5...2n+1?
An idea?
Thanks
Regards,
Stf

AmandaLu

439 Posts

Posted - 06/09/2017 :  06:33:56 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Please try labtalk script.

for(ii=1;ii<=wks.ncols;ii+2)
{
range aa = %(ii);
csetvalue col:=aa formula:="int(rnd()*100)";
}

Here is the document of cstvalue X-Function:

http://www.originlab.com/doc/X-Function/ref/csetvalue

Thanks,
Amanda
OriginLab Technical Service
Go to Top of Page

lenfant

France
Posts

Posted - 06/09/2017 :  08:04:46 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Perfect!
Thanks,
Stf
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