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
 All Forums
 Origin Forum
 Origin Forum
 Variable in every single column

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
ONeilll Posted - 03/09/2023 : 04:48:53 AM
Origin Pro 2023 10.0.0.154
Operating System: Windows 10

Hello Origin Community!
To calculate a value of a column I use a formular that includes a "user defined variable" that is located in %(Col(XXX)[D1]$. So far I change XXX for every single column, e.g., in column A it is %(Col(A)[D1]$. I do not want to change it by hand for every single colum. How can I make the column name as a variable? Many thanks for your help in advance.
6   L A T E S T    R E P L I E S    (Newest First)
ONeilll Posted - 03/10/2023 : 03:40:25 AM
Thanks Snowli, that is working for me. Appreciate your comments, thanks to the both of you!
snowli Posted - 03/09/2023 : 12:39:19 PM
This seems work
-cos(This[D1]/180*PI)*(5)/(ln(wcol(1)))


Also instead of using column name, u can use wcol(j) to refer to current column.

E.g. -cos(%(wcol(j)[D1]$)/180*PI)*(5)/(ln(wcol(1)))


U can double click the black dot at bottom right corner of F(x) cell to auto fill F(x) cells of all columns to its right.

Thanks, Snow
ONeilll Posted - 03/09/2023 : 10:59:45 AM
Dea James,thanks again. You can find a minimal example attached.


YimingChen Posted - 03/09/2023 : 10:18:50 AM
Please provide more details or maybe attach a screenshot of your worksheet. Thanks.
ONeilll Posted - 03/09/2023 : 10:13:37 AM
Dear James,
thanks for your answer, but that does not work for me. It is indeed in the current colume, but when I use your suggestion origin does not seem to find the value.
YimingChen Posted - 03/09/2023 : 08:59:14 AM
Can you try %(This[D1]$) if the calculation is for the current column?

James

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000