+ Reply to Thread
Results 1 to 5 of 5

Vlookup With If Problem.

  1. #1
    Registered User
    Join Date
    03-29-2011
    Location
    Glasgow, UK
    MS-Off Ver
    Excel 2003
    Posts
    4

    Vlookup With If Problem.

    I'm having big Vlookup issues today as well... I've been banging my head against them for 2 hours now!

    I have 3 spreadsheets (1) a list of preferred suppliers on them, (2) with every order we've placed and (3) with all the spend indvidual accounts.

    Looking between (2) and (1) I've used

    =IF(EXACT(F56,VLOOKUP(F56,'[Confirmed Preferred Vendor List 3rd December 2010 (Final)modded nh.xls]BBES - Final'!$A$2:$A$748,1)),"yes","no")

    to tell me if a supplier is on the preferred list. However, I now need to do the same for a more specialist subset on (3). I've used the exact same formula but every single one has returned "no".

    I added a line called "test" to sheets (1) and (3) which returned "yes", so I tried overtyping a value I knew was present in both sheets and still got "no".

    Suggestions?

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Vlookup With If Problem.

    It's quite likely that it's to do with the lookup value and the values in the table array being different or that your data in the table array isn't sorted correctly with you not specifying an exact match in your formula.

    If you could provide a sample workbook it would to be able to visualise the problem.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,427

    Re: Vlookup With If Problem.

    I suspect that this formula would do it:

    =IF(ISNA(VLOOKUP(F56,'[Confirmed Preferred Vendor List 3rd December 2010 (Final)modded nh.xls]BBES - Final'!$A$2:$A$748,1,FALSE)),"no","yes")


    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    03-29-2011
    Location
    Glasgow, UK
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Vlookup With If Problem.

    Thanks TM, I'm still having the same problem, but now they all say "yes" instead of "no". Progress of sorts, I guess!

    The really puzzling thing is that the test line works!

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,427

    Re: Vlookup With If Problem.

    As Dom said, post a sample workbook and we'll all have a better idea. You'll need to post both the source and target books.

    Regards

+ 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