Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Vlookup - 3 collumns

Posted on 2014-04-07
5
Medium Priority
?
200 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 8

Accepted Solution

by:
Naresh Patel earned 2000 total points
ID: 39982736
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
ID: 39982771
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:Naresh Patel
ID: 39982786
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:Naresh Patel
ID: 39982794
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
ID: 39986775
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

722 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