+ Reply to Thread
Results 1 to 3 of 3

Vlookup table only works in alphabetical order???

  1. #1
    Registered User
    Join Date
    05-23-2006
    Posts
    8

    Vlookup table only works in alphabetical order???

    I have a lookup table, the lookup item is a text string (county name) and if I sort the table by any column other than county name, the lookup function below will not work:

    =VLOOKUP($C$15,$CM$15:$DM$107,6)

    The C15 cell is a drop-down list where other users select which county they want data for. CM15:DM107 is my lookup table (hidden) and row 6 is the column of data I need returned.

    Has anyone else experienced this problem?

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    If you don't have the 4th argument of VLOOKUP set to zero or FALSE then you need to have the first column of the lookup range sorted ascending.This also allows an approximate match.

    In your case, you want an exact match and an unsorted table so you simply add a zero like this:

    =VLOOKUP($C$15,$CM$15:$DM$107,6,0)

  3. #3
    Registered User
    Join Date
    05-23-2006
    Posts
    8
    Quote Originally Posted by daddylonglegs
    If you don't have the 4th argument of VLOOKUP set to zero or FALSE then you need to have the first column of the lookup range sorted ascending.This also allows an approximate match.

    In your case, you want an exact match and an unsorted table so you simply add a zero like this:

    =VLOOKUP($C$15,$CM$15:$DM$107,6,0)
    many thanks. that did it. I usually ignore that 4th argument, but I guess I should get in the habit of using it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1