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

x
Solved

# VLOOKUP does not work.

Posted on 2014-02-08
Medium Priority
384 Views
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
Question by:Jeremy-M
[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

LVL 52

Accepted Solution

Rgonzo1971 earned 1000 total points
ID: 39844140
Hi,

pls try Index and Match

``````=INDEX(A2:B6,MATCH(D2,A2:A6,0),2)
``````
Regards
indexMatch.xlsx
0

LVL 70

Assisted Solution

KCTS earned 1000 total points
ID: 39844151
Here its the solution using VLOOKUP
vlookup.xlsx
0

LVL 19

Expert Comment

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

LVL 43

Expert Comment

ID: 39844161
You can use a vlookup with the last argument 0

like

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

LVL 33

Expert Comment

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

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

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
###### Suggested Courses
Course of the Month6 days, 7 hours left to enroll