Solved

Vlookup - 3 collumns

Posted on 2014-04-07
5
197 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 500 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

626 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