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
 Table-Function - include References (Solved)

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
Cracker Posted - 06/07/2022 : 08:02:16 AM
Dear forum members,
I have two questions/problems.

For a project I would like to use the table function (link below). Until now i used the index function (pic below green background), but unfortunately not all my data is strictly monotonic. So I switched to the table function.
As you can see (purple background), I am able to generate the same data. My first problem is, I cannot add cellreferences into the function.

The picture shows the function "=table(1!C;1!C;C1;2)-C1". But instead of "1!C" I would like to insert "A2" -> "=table(A2;A2;C1;2)-C1". This does not work, the result is -50.

Secondly, I cannot "fix/lock" certain references using $. As soon as I add the $ symbol, like "=table(1!$C;1!C;C1;2)-C1" the table function returns the value 0.

With the index function I had none of these issues. Maybe I am missing something, Origin is a relative new experience for me.

The ideal solution would be to add the cellreferences and lock these.






Link: https://www.originlab.com/doc/en/LabTalk/ref/Table-func

Thanks in advance,
Cracker

I am using:
Windows 10 Home
Origin 2021, Vers. 9.80.200
2   L A T E S T    R E P L I E S    (Newest First)
Cracker Posted - 06/07/2022 : 09:35:53 AM
Hello James,

thank you for your help. Your expression works perfectly. Also, thanks for explaining your solution, this "Substitution" is something new to me.

Cheers
Cracker
YimingChen Posted - 06/07/2022 : 09:09:24 AM
Can you try the following script:
=table(%($A2$); %($A2$); C$1; 2)  - C$1


In %($A2$), the first dollar sign is to fix col(A) when extending to the right cells. The second dollar sign plus the percentage sign is substitution notation which substitute A2 by its content 1!C before execution.
https://www.originlab.com/doc/en/LabTalk/guide/Substitution-Notation#.25.28_.29_Substitution

In C$1, the dollar sign is to fix row 1 when extending the cells downwards.


James

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