+ Reply to Thread
Results 1 to 8 of 8

VLOOKUP problem

  1. #1
    Registered User
    Join Date
    09-28-2011
    Location
    Waukee, IA
    MS-Off Ver
    Excel 2010
    Posts
    8

    VLOOKUP problem

    I have a table that has different names in left column with numbers relating to that name in columns B-Z for years 1986-2011 in Sheet 2.

    On a seperate sheet I have a box where a formula populates the name. "Franklin" is the name currently in the reference cell (B$5).

    If I enter VLOOKUP(B$5,Sheet 2 range,2,FALSE) then I get a #N/A

    If I enter VLOOKUP(B$5,Sheet 2 range,2) than I get the data for the cell above Franklin.

    **where Sheet 2 range is actually specific to the range of data

    I have made sure I don't have any spaces in either one of the inputs or the table and can't get past this. Anybody know what I am doing wrong?
    Attached Files Attached Files
    Last edited by CycloneBrian; 10-11-2011 at 11:41 AM.

  2. #2
    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,243

    Re: VLOOKUP problem

    Could be that the search item is numeric and the lookup data is text or vice versa.

    Is the search range absolute?

    Difficult to tell from just a description.

    You need the false for an exact match in an unsorted list.

    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


  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: VLOOKUP problem

    The only other thing that I can think of that can cause that issue is that Franklin is mispelled in one or the other location. Have you double checked that?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    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 problem

    Hi,

    There must be something different between the lookup value and that in your data table.

    Easiest way to see what this is would be if you could upload a sample worksheet.

    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.

  5. #5
    Registered User
    Join Date
    09-28-2011
    Location
    Waukee, IA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: VLOOKUP problem

    I just uploaded a sample file on the original post

    Thanks for the help

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: VLOOKUP problem

    There is a trailing space after Franklin in C36 of Country Yields sheet....

    and the formula should be:

    =VLOOKUP(B$3,'County yields'!$C$4:$AB$101,Sheet2!I14,FALSE)

  7. #7
    Registered User
    Join Date
    09-28-2011
    Location
    Waukee, IA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: VLOOKUP problem

    Thanks a lot. I just figured that I screwed something up in my calculations, not the data I imported from somewhere else having a space after every name.

    This site is awesome!!!

  8. #8
    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,243

    Re: VLOOKUP problem

    I have made sure I don't have any spaces in either one of the inputs or the table

+ 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