Solved

VLOOKUP does not work.

Posted on 2014-02-08
6
341 Views
Last Modified: 2014-02-10
I have an Excel workbook of employees. One table has them ranked by seniority. The seniority table is not alphabetically ordered by name. I have tables for each department with a seniority column; however, I have been unable to create a formula that will search the employee worksheet and return the seniority rank, a number, of the employee.  VLOOKUP requires that the lookup table or array be ordered alphabetically. Any suggestions:

Employee Table                  Shipping Department
Name          Seniority            Name              Seniority
John Jones      1                     Chris Smith      
Mary Brown      2                    Al Ryan
Walt Baker      3
Al Ryan            4
Chris Smith      5
0
Comment
Question by:Jeremy-M
6 Comments
 
LVL 48

Accepted Solution

by:
Rgonzo1971 earned 250 total points
Comment Utility
Hi,

pls try Index and Match

=INDEX(A2:B6,MATCH(D2,A2:A6,0),2)

Open in new window

Regards
indexMatch.xlsx
0
 
LVL 70

Assisted Solution

by:KCTS
KCTS earned 250 total points
Comment Utility
Here its the solution using VLOOKUP
vlookup.xlsx
0
 
LVL 19

Expert Comment

by:MINDSUPERB
Comment Utility
Hello Jeremy-M,

You can actually use V-Lookup in your example by using a similar formula below:

=VLOOKUP(A2,'Employee Table'!$A$2:$B$6,2,FALSE)

Sincerely,

Ed
VlookUp.xlsx
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 43

Expert Comment

by:Saqib Husain, Syed
Comment Utility
You can use a vlookup with the last argument 0

like

=Vlookup(C2,$A$1:$B$100,2,0)
0
 
LVL 31

Expert Comment

by:Rob Henson
Comment Utility
To expand on the above two comments, VLOOKUP does NOT require the data to be sorted when using FALSE or 0 for the last parameter. The FALSE or 0 tell the formula to find an exact match regardless of sort order.

If this parameter is omitted, the data does have to be sorted in order for the CLOSEST match to be found. If the data is not in order the VLOOKUP will find the first match that is close to but not larger than the search value. So for example, the data below is not fully sorted:

55
76
96
77
43

Doing a vlookup for value 78 would return a match at the row with 76 whereas if the data was sorted it would return the result from finding the 77. Searching for 44 would give an error because the first result is already larger whereas sorted would give 43.

Thanks
Rob H
0
 

Author Closing Comment

by:Jeremy-M
Comment Utility
The two answers I accepted worked.I learned a use of VLOOKUP that I was not aware would work and I learned more about using INDEX-MATCH I have awarded both of you an A for excellent and clear answers.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This collection of functions covers all the normal rounding methods of just about any numeric value.
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
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 demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

772 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