Solved

VLOOKUP does not work.

Posted on 2014-02-08
6
360 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 49

Accepted Solution

by:
Rgonzo1971 earned 250 total points
ID: 39844140
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
ID: 39844151
Here its the solution using VLOOKUP
vlookup.xlsx
0
 
LVL 19

Expert Comment

by:MINDSUPERB
ID: 39844157
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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 43

Expert Comment

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

like

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

Expert Comment

by:Rob Henson
ID: 39847116
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
ID: 39847489
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

815 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

12 Experts available now in Live!

Get 1:1 Help Now