+ Reply to Thread
Results 1 to 6 of 6

Vlookup issues

  1. #1
    Registered User
    Join Date
    06-15-2009
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    13

    Vlookup issues

    Hi

    Just wondering if anyone cant help me out on this?

    I posted earlier with an issue, i couldnt explaine it properly so i started to make a work around but i now have another issue caused by this

    I am searching through a table of of 8000 lines and want to use a VLookup to search for an unique ID and something really strange is happening and i cant understand why as i have copied the unique code straight from the data it is searching

    the data range that is being searched is A4:K8000 which has been named as a range of "TeamFigures" so the forumla that i am

    Q5 is pulling the unique referance

    "=VLOOKUP(Q5,TeamFigures,2,FALSE)"

    some times this forumla is working other times it is returning a N/A

    Any idea's, also can this be written in VBA instead of code on the sheet?

    Cheers

    P

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Vlookup issues

    If it doesn't work on the worksheet then why would it work any better in VBA?

    Can you post a sample workbook and maybe we can spot a reason why!
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    06-15-2009
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Vlookup issues

    Unfortunatly i cant upload a copy of it as it has corp sensitive data in it, but does a vlookup have a limit that it can lookup

    the formula looks ok and i have used the same thing but not on the same scale before

    the reason why i asked about doing it VBA becuase then it is hiden from the end user

    Cheers

    P

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Vlookup issues

    The only limit I know of, a Vlookup can only search from left and return a value to the right.

    Without a sample workbook or any further guidance it's hard to recommend something, but take a look at this sample workbook which used a Vlookup in VBA.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-15-2009
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Vlookup issues

    Found a work around for some reason the unique string in the figures book which is sent from head office has two row's

    eg

    000000001
    000000001 Total

    So i have done this it does the trick but too sloppy for my liking lol, the data in "Data!D8" is the 000000001 unique id


    N1 = "="0"&Data!D8&" Total"
    "=VLOOKUP(N1,A1:K7800,3,FALSE)"

    at least it works lol, looking at what i have had to do how would i put theat in to the VBA you uploaded

    Thanks so much for this

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Vlookup issues

    Okay post back if you have any further questions.

+ 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