T O P I C R E V I E W |
zango24 |
Posted - 08/09/2015 : 2:41:24 PM Origin Ver. and Service Release (Select Help-->About Origin): 8.6 Operating System: win 7
Hello friends, I need a help in generic code. I have few columns with some values. I want to do the job:
Let's say on col (A),I would like to do col(A)=((col(A)*2)-1). I am able to do this by using set column value item. But it's pain to do it manually for several columns. So if you can help me with a code or small script to repeat this job on multi column worksheet it would be a great help.
cheers Zan
|
3 L A T E S T R E P L I E S (Newest First) |
cpyang |
Posted - 08/09/2015 : 11:29:40 PM i and j can only be used in the context of the set values dialog, as it is a looping variable. j is to use to indicate column index in a Set Multiple Column Formula situation and in order to use j, you need to use wcol, not col, as the col function takes column name or index in literal number like 1 2 3, but to use a numeric variable, you need to use wcol instead.
CP
|
zango24 |
Posted - 08/09/2015 : 10:36:15 PM Thanks mate. Apart from this I am confused about i and j. What does i and j denote in the general script language???
Like you took this col(j)....does i refers to row??? and j refers to column???
Cheers. Zan |
cpyang |
Posted - 08/09/2015 : 8:54:49 PM You can use Set Multiple Column Values, which was added to Origin since 9.1.
In such Set Values, you can use
wcol(j) = (wcol(j)*2)-1
CP
|