+ Reply to Thread
Results 1 to 4 of 4

Spot the error... VLOOKUP

  1. #1
    Registered User
    Join Date
    11-14-2012
    Location
    Manchester, England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Spot the error... VLOOKUP

    Hi,

    I have a list of 1250 people. Every person belongs to a cost code, of which there are about 50. I am looking at two lists on two sheets. I'm trying to get all the data between the two lists to match. The two lists are similar but every row may not correspond with the same row on the other sheet.

    I have uploaded a dummy example. I want to compare column B in sheets 1 and 2. I have completed a successful VLOOKUP for employee number, but that is a unique code. Is it possible if the data is not unique?

    Any help you could give would be great. And an explanation as to why I can't get it work would be even better. CC example.xls

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Spot the error... VLOOKUP

    you have specified a single range of column b so vlookup can only look at column 1
    =IF(VLOOKUP($B2,'HR current October'!$B$2:$B$4,1,FALSE)=VLOOKUP('HR current October'!$B2,'October SiP EG'!$B$2:$B$4,1,FALSE),"match","change")
    however if there is no match you will get #n/a as this overrides the option to give back a false return
    if you just want to see if columb b from one sheet is in the other 2 sheets
    =IF(AND(COUNTIF('October SiP EG'!B2:B20,B2),COUNTIF('HR current October'!B2:B20,B2)),"match","change")
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    11-14-2012
    Location
    Manchester, England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Spot the error... VLOOKUP

    thanks very much for that. would you say the COUNTIF is better to use for reconciling, or just in certain circumstances?

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Spot the error... VLOOKUP

    no idea if its better it just does what you were trying to do with vlookup without failing if no match.lots of ways to skin a cat

+ 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