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
 Moving data between Books
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

esmann

Denmark
Posts

Posted - 11/15/2013 :  08:51:28 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 9.0
Operating System: Window 7
Dear OriginLab
I wish to use a worksheet value in a given Book (for example Book1, Sheet1, Col A row 4, let the value be 24) for a calculation in another worksheet (Book2, Col B), typically using the Set Values facility.
How do I set the values of Col B in Book2 using the contents of Book1, Col A row 4, multiplying it with for example the row number (i)?
I recall being able to do this in Origin 3.5 many years ago, but need help now - when I try to address the entry as [Book1]Sheet1!"Col A"[4] is does not give the value of 24.
Best wishes
Mikael Esmann

lkb0221

China
497 Posts

Posted - 11/15/2013 :  10:15:05 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi, Mikael

Please try the following: range r1 = [Book1]Sheet1!Col(A)[4:4];

And then use "rr" in the calculation formula.

For example:
// start a new project, have a blank workbook Book1
col(A) = Data(0,10,1); //Generate patterned data
newbook; // Will be Book2
range r1 = [Book1]Sheet1!Col(A)[4:4];
col(A) = Data(0,10,2); //Generate patterned data
col(B) = col(A) + r1;

Hope this would help.

Zheng

Go to Top of Page

snowli

USA
1386 Posts

Posted - 11/15/2013 :  1:38:15 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You can look at this FAQ page
http://originlab.com/www/support/resultstech.aspx?language=english&ID=1464

1. Basically select col(B) of Book2 and open Set Column Values dialog.
Choose Variables: Insert Variable by Selection... menu in the dialog.

2. Then you are in hunt mode to pick the range. You can click Col(A) row 4 of Book1.
Then click the hunt done button to go to to Book2 Col(B)'s Set Column Values dialog.

--> U can see a range variable defined at the bottom Before Formula Scripts panel.
e.g. range r1=[Book1]Sheet1!A[4:4];

4. In 9.0, you need to then define a double variable
double dd=r1

5. Then you can use dd in the Formula part. E.g. dd*i*col(A), etc.


We have just released 9.1, where you don't need to do step 4. You can directly use r1 in the fomula box.

Thanks, Snow Li
OriginLab Corp.
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