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
 VLOOKUP

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
MISE Posted - 05/11/2015 : 08:02:26 AM
Dear all,

I am using Origin 9.0 with Win 7 and looking for a solution to the following problem:

I have column A with product No. or ID.
Column B with price
Column C with product No. or ID.
I want to fill column D with prices of products listed in column C based on columns A and B.

With MS Excel I could solve this with "VLOOKUP". But I dont want to use MS Excel. Anyone know a comparable way to solve it with Origin?

Any help is appreciated

PS: Occasionally I have the chance to use Origin 9.1, if that makes any difference.

4   L A T E S T    R E P L I E S    (Newest First)
MISE Posted - 05/13/2015 : 08:53:07 AM
Works perfectly! Thank you very much.

Hideo Fujii Posted - 05/12/2015 : 10:17:44 AM
Hi MISE,

The following code does the job for the above sample:
range rA=col(A);
range rB=col(B);
range rC=col(C);
range rD=col(D);
nr=rC.getSize(); //number of rows
for(ii=1; ii<=nr; ii++) {
  rD[ii]=rB[List(rC[ii],rA)]; //find and assign
}
You can learn LabTalk scripting from the following Guide/Tutorials:
http://www.originlab.com/doc/LabTalk/guide

Hope you enjoy to learn scripting.

--Hideo Fujii
OriginLab
MISE Posted - 05/12/2015 : 03:41:01 AM
That only works with Origin 2015. I need exactly that function in Origin 9.0 or 9.1. Unfortunetaly I am new to Origin
I have no idea how to make this work with a script. Any hints?
Hideo Fujii Posted - 05/11/2015 : 2:19:20 PM
Hi MISE,

You can use the Lookup function in the Set Column Values tool as shown below:



You can read the details of this function at:
http://www.originlab.com/doc/LabTalk/ref/Lookup-func

Hope this works for your application.

--Hideo Fujii
OriginLab

P.S. Sorry, the Lookup function is a new feature of Origin 2015 version. In early versions, scripting may be needed.

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