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 for Programming
 LabTalk Forum
 Extract col(B) vs col (A) from another worksheet

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
Gandi Posted - 12/22/2011 : 8:06:28 PM
I would like to extract data from several worksheets (of the same structure) in one workbook and save it in another worksheet/workbook. Each source worksheet consists of two columns: col(A) (=X) and col(B) (=Y). I would like to get the value of col(B) at a certain, fixed value of col(A), save this to the output worksheet, then get the next value from the following source worksheet, save it and so on. The fixed value (=X) might not be one of the values of col(A), i.e. interpolation would be required.

In principle this is easy; one can use col(B)(x), if the column designations are set accordingly. However, this only works for the active worksheet.

I have tried to use the range command, but from what I can see this only lets me access the value of col(B) at a certain index, but not the value of col(B) that corresponds to a random, fixed value of col(A). Hence my question is if there is a version of the col(B)(x) command that lets me specify in which workbook/worksheet this col(B) is to be found?

Any help is appreciated.

--
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 8.5.0 SR1
Operating System: Win 7 (64 bit)
2   L A T E S T    R E P L I E S    (Newest First)
Gandi Posted - 01/09/2012 : 2:27:23 PM
Great, thanks!
Penn Posted - 12/25/2011 : 10:35:40 PM
Hi,

The range variable works fine. For example:

range r1 = [book1]sheet1!col(b);  // col(b) range
r1(1.5) = ;  // get value of col(b) at X=1.5, interpolation is performed here





Penn

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