+ Reply to Thread
Results 1 to 4 of 4

Vlookup always gives me #NA

  1. #1
    napko
    Guest

    Vlookup always gives me #NA

    I have a shee1 like this
    A B C
    D
    ID sub-id grp_id
    value
    72 6308 1006308_30072 -103686.5016
    72 6308 1006308_30072 103686.5016
    73 6308 1006308_30073 -103686.5016
    73 6308 1006308_30073 103686.5016
    50 3338 1013338_30950 -2084777.338
    51 3339 1013339_30951 -622559.5433

    in another sheet I have data like this
    A B C D E
    F
    Date trade sub-id cval grp_id
    2/20/06 72 6308 102726.2239 1006308_30072
    2/20/06 73 6308 -102726.2239 1006308_30073
    2/20/06 50 3338 0 1013338_30950
    2/20/06 51 3339 0 1013339_30951
    2/20/06 74 4532 -13688891.94 1014532_30074
    2/20/06 75 4533 1555032.903 1014533_30075

    I want to fill the column F with value from sheet 1 based on grp_id.
    How can i do that



  2. #2
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    Vlookup should work you just have to be sure that the array you are pulling the data from starts with the grp-id column or column C. If your Vlookup was referring to column A as the first column, that is where it is looking for the grp id which it is not located in so you get the NA error.

    Try it like this in column F.

    =VLOOKUP(E1,LookupSheetC1:D6,2,FALSE)

    If it is not there, the VLOOKUP will return an NA error also.

    Does that help?

    Steve

  3. #3
    paul
    Guest

    Re: Vlookup always gives me #NA

    but vlookup wont look to the LEFT of grp id you will have to use index/match
    for that
    --
    paul
    remove nospam for email addy!



    "SteveG" wrote:

    >
    > Vlookup should work you just have to be sure that the array you are
    > pulling the data from starts with the grp-id column or column C. If
    > your Vlookup was referring to column A as the first column, that is
    > where it is looking for the grp id which it is not located in so you
    > get the NA error.
    >
    > Try it like this in column F.
    >
    > =VLOOKUP(E1,LookupSheetC1:D6,2,FALSE)
    >
    > If it is not there, the VLOOKUP will return an NA error also.
    >
    > Does that help?
    >
    > Steve
    >
    >
    > --
    > SteveG
    > ------------------------------------------------------------------------
    > SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
    > View this thread: http://www.excelforum.com/showthread...hreadid=515509
    >
    >


  4. #4
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    True. VLOOKUP will not look to the left but given the example in the OP, the value is to the right of the grpID. The other option would be to use the ID field for the lookup if the ID's are unique to the grpIDs which it appears they are in the sample data.

    Steve

+ 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