Solved

Vlookup - 3 collumns

Posted on 2014-04-07
5
191 Views
Last Modified: 2014-04-09
Overview

In the attached worksheet sheet 1 column A displays the list of customers. You will see there are duplicates of each customer throughout.

Sheet 2 displays the list of customers without the duplicates but also includes some other important information about each customer.

Column 'L' = customer name
Column 'M' = market category
column 'N' = rank


Question

How do I match the information for each customer on sheet two to the customer names in sheet 1.

For example I want  DRAKE TOOLING & ABR. LT      Cutting Tools      28      

to display next to every duplicate row of DRAKE TOOLING in Sheet 1.

I want to do this for every customer.

I am a complete novice to excel. I believe it would involve using the vlookup function but I have little experience of this?
Vlookup-question.xlsx
0
Comment
Question by:rob700
  • 3
5 Comments
 
LVL 8

Accepted Solution

by:
itjockey earned 500 total points
Comment Utility
Use this formula in Sheet 1 Column B

Cell B2 =VLOOKUP(A2,Sheet2!$A$1:$C$146,2,FALSE) and copy past formula till down

& in Cell C2 =VLOOKUP(A2,Sheet2!$A$1:$C$146,3,FALSE)

Thanks
Vlookup-question.xlsx
0
 

Author Comment

by:rob700
Comment Utility
Could you explain the process taken to come to this formula so I am able to understand and apply the process myself next time?

Thanks
Rob
0
 
LVL 8

Expert Comment

by:itjockey
Comment Utility
Sure

This is syntax for VLOOKUP Function.
VLOOKUP( value, table_array, index_number, [not_exact_match] )

Value =  value you wan tot look up in our case it is in sheet 1 - A2
Table Array = From which table you want to look up this value so it is in sheet 2 - A1:C146.
Index number = in table array which value want if look value found. in our case column number 2 & for Rating is Column number 3.
Not Exact Match = True or False, True will return to approx. match & False will return to exact match.

table array I had locked so it will remain freeze for formula drop down.

further help pls let me know. I glad to assist you.

Thanks
0
 
LVL 8

Expert Comment

by:itjockey
Comment Utility
There are many thing in VLOOKUP it self you can use combination of VLOOKUP function with MATCH. or INDEX MATCH function if lookup value is not in column number one i.e. in table selected.

I preffer you use below formula I stead of simple one.
for B2 =IFERROR(VLOOKUP($A2,Sheet2!$A$1:$C$146,MATCH(B$1,Sheet2!$A$1:$C$1,0),FALSE),"")
for C2 =IFERROR(VLOOKUP($A2,Sheet2!$A$1:$C$146,MATCH(C$1,Sheet2!$A$1:$C$1,0),FALSE),"")

As if there is any error this that will return to "" in stead of error message & you have to give header in Sheet 1 so if change header it will change its values too.

More on VLOOKUP MATCH ? I will

Thanks
0
 
LVL 1

Expert Comment

by:J2F
Comment Utility
I like itjockey's formula for cell B2.

I would note if the values in cell B1 on Sheet 1 does not match the value in cell B1 on Sheet 2 nothing will be displayed anything since the "IFERROR" function returns TRUE and the ,"") portion of the formula is executed.

I would suggest, changing the
,"") portion of the formula in B2 to read
CHAR(34) & B$1 & CHAR(34) & " not found on sheet2!")

This will let the user know not only that something is wrong but also what is wrong.

To enter the formula for C2, just copy the formula from B2 to C2.

Jim
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now