+ Reply to Thread
Results 1 to 2 of 2

Vlookup returning errors

  1. #1
    Registered User
    Join Date
    11-03-2009
    Location
    Nottingham
    MS-Off Ver
    Excel 2003
    Posts
    12

    Vlookup returning errors

    I want to check the post codes from both new data and data and return ref in column A sheet 2. At the moment all I get are errors?

    Example would be D3 "new data" is a match with D3 "data" should return 10562 in A3 "new data".

    Sent example sheet to help.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Vlookup returning errors

    Let's examine your formula;
    =VLOOKUP(D2,data!D2:D7,7,FALSE)
    D2 is what you want to look up, in
    data!D2:D7 (data array)
    and (after finding a match)returning the result from column 7 of your array.
    "False" means return only exact matches

    First of all, your array is set to a single column (D) and you ask Excel to return the results from Column 7. If you want to return Ref from Column G, your data array should be D2:G7 and return column 4.

    Also, lock your array reference in place with $. Otherwise when you drag or copy your formula, the reference will change. ie in A6, you have =VLOOKUP(D6,data!D6:D11,7,FALSE) which is now looking in D6:D11 instead of D2:D7.

    So your new formula in A2 should be
    =VLOOKUP(D2,data!$D$2:$G$7,4,FALSE)

    Does this help?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ 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