Author |
Topic  |
|
ONeilll
33 Posts |
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.
|
|
YimingChen
1651 Posts |
Posted - 03/09/2023 : 08:59:14 AM
|
Can you try %(This[D1]$) if the calculation is for the current column?
James |
 |
|
ONeilll
33 Posts |
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. |
Edited by - ONeilll on 03/09/2023 10:17:52 AM |
 |
|
YimingChen
1651 Posts |
Posted - 03/09/2023 : 10:18:50 AM
|
Please provide more details or maybe attach a screenshot of your worksheet. Thanks. |
 |
|
ONeilll
33 Posts |
Posted - 03/09/2023 : 10:59:45 AM
|
Dea James,thanks again. You can find a minimal example attached.
 |
Edited by - ONeilll on 03/09/2023 11:01:29 AM |
 |
|
snowli
USA
1417 Posts |
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
33 Posts |
Posted - 03/10/2023 : 03:40:25 AM
|
Thanks Snowli, that is working for me. Appreciate your comments, thanks to the both of you! |
 |
|
|
Topic  |
|