• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to look a value up from one column in a second column and return a 3rd

Hayley

Member
Please help!


I have 2 list sets. One shows id numbers and one shows id numbers and a supplier name. I want to look up the values from the first list in the second list and if there's a match, return the associated supplier name.


So if I have:


column A col B col C

ID ID SUPPLIER

123 123 abc company

234 112 hij company


I tried doing =LOOKUP(A2,B:B,C:C) and it returned #N/A.


How the heck do I do this?


Thanks,

Hayley

345 234 def company
 
Use VLOOKUP instead. LOOKUP likes sorted data.

=VLOOKUP(A2,$B$1:$C$1000,2,0)

Please note I've used definite range in place of whole columns.
 
I think my sample table is messed up:


`ID ID Supplier

123 123 abc company

234 112 def company

345 234 rjk company


Does that work better? So I want to look up the values from the first column, look them up in the second column. And if it's there, return the third column.


I want 123 to return back abc company, I want 234 to return back rjk company. And I want 345 to return blank or false or whatever.


VLOOKUP didn't work - do I have to have the lookup column to the left or right?
 
Hi Hayley,


shrivallabha's formula will work for you:


=VLOOKUP(123,A2:C4,3,FALSE)


Your data is in cells A1:C4


Regards,
 
Hello,


I am doing something similar. I want to look up from the Nr. list in Column A in Second Nr. list that is Column C and then fetch corresponding EAN number in Column D. I tried using VLOOKUP(A5;$B$5:$D$1048576;8;FALSE) but this throws REF error..Could you please help me


Nr.-Col A

000004724

000004725

000004726

000004728

000004729

000004730

000004731

000004734

000004736


Nr-Col c EAN-Col D

006391818 805289127680

006439110 805289418795

006438392 805289151999

006391895 715799083768

000004734 679420177311

006482523 713132454336

006400515 700285132952

000004729 700285132945

006400528 700285118659

006401307 700285234137


Thanks,

Shobha
 
Hi Shobha,


Try using the below formula.


=VLOOKUP(A5,$B$5:$D$1048576,8,FALSE)


Still you face issue please upload the file.


Thanks,

Suresh Kumar S
 
Hi Shobha,


Just a blind guess..


Code:
=VLOOKUP(A5;$C$5:$D$1048576;2;FALSE)
may work.. as

Nr. list in Column A in Second Nr. list that is Column C and then fetch corresponding EAN number in Column D

@ suresh,

One more guess... Her/his Excel Delimiter is ; which is default in EU countries.. and in many reagions..


And in B to D you can't find Column # 8..


Regards,

Deb
 
Hi Shobha..


Glad that it helps..


Just for information..

In the top the the forum main page.. a link to create NEW TOPIC.. If you have any more queries.. and although it look alike someone's post, but not fully matched your requirement.. Please start a new topic..


http://chandoo.org/forums/?new=1


By the Way.. Welcome to the Forum...


Regards,

Deb
 
Back
Top