+ Reply to Thread
Results 1 to 9 of 9

VLOOKUP Table Problem

  1. #1
    Daywalker
    Guest

    VLOOKUP Table Problem

    I'm kicking myself at the moment, should be a simple task but cannot get it to work.

    Basically I have a drop list of postcodes named as "Pcodes", and a database listsing employees and the postcode area they cover names "Data".

    I've been trying using VLOOKUP to identify and list, how can I get the table to list each employee that covers the same postcode ?

    I've attached a basic example of what I'm trying to do.

    Cheers,

    Daywalker

    Postcode.zip

  2. #2
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852
    Quote Originally Posted by Daywalker
    I'm kicking myself at the moment, should be a simple task but cannot get it to work.

    Basically I have a drop list of postcodes named as "Pcodes", and a database listsing employees and the postcode area they cover names "Data".

    I've been trying using VLOOKUP to identify and list, how can I get the table to list each employee that covers the same postcode ?

    I've attached a basic example of what I'm trying to do.

    Cheers,

    Daywalker

    Attachment 19704
    The name of the person should be After the data you are looking for. (Post Code)

    Insert a column before the name and put the codes there.In the formula insert the following:

    =Vlookup($D$4;Database!$A2:$I27;2;FALSO)

  3. #3
    Daywalker
    Guest

    Vlookup

    Portuga,

    You completely lost me on that one.

  4. #4
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852
    Quote Originally Posted by Daywalker
    Portuga,

    You completely lost me on that one.

    1 Person Name can not be column a, it must be column B
    2 Code Must be column a
    3 Vlookup formula =Vlookup($D$4;Database!$A2:$I27;2;FALSE)

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,493
    Quote Originally Posted by Daywalker
    Portuga,

    You completely lost me on that one.
    I believe the point is, Vlookup does not work backwards, the lookup criteria has to be to the left of the results,

    I would suggest to try Auto-filter to get the results you want

    http://www.contextures.com/xlautofilter01.html

    Even check this example,of course may have to format your sheet differently for this to work properly
    http://www.excelforum.com/attachment...8&d=1201836478

  6. #6
    Daywalker
    Guest

    Vlookup

    Ok, with you now.

    Cheers for that guys.

  7. #7
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    See if example helps

    uses an array formula (Enter with Ctrl + Shift + Enter)

    =IF(ISERROR(INDEX(Database!$A$1:$A$5,SMALL(IF(Database!B$1:B$5=Search!D$4,ROW(Database!B$1:B$5)),ROW(1:1)),1)),"",INDEX(Database!$A$1:$A$5,SMALL(IF(Database!B$1:B$5=Search!D$4,ROW(Database!B$1:B$5)),ROW(1:1)),1))

    VBA Noob
    Attached Files Attached Files
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  8. #8
    Daywalker
    Guest

    Vlookup

    VBA Noob,

    Yip, see what your saying on this one, but some guys can have as many as 30 to 40 post codes to work around. So the table would be huge.

    (But I'm keeping that idea, already know what I'm going to use it for)

    I just searching just now to see if I can find a macro code to just look at the "Data" table, and if the search criteria say matched "EH1", then it would list all the employees names below.

    Might be an easier option I think. So off to surf.

  9. #9
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Does attached help

    VBA Noob
    Attached Files Attached Files

+ 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