+ Reply to Thread
Results 1 to 6 of 6

Complicated V Lookup help

  1. #1
    Registered User
    Join Date
    05-31-2012
    Location
    Maine
    MS-Off Ver
    Excel 2007
    Posts
    4

    Complicated V Lookup help

    I'm trying to pull data from spreadsheet 2 into spreadsheet 1.

    Spreadsheet 1 has names in this order,
    John
    Sara
    Katie


    Spreadsheet 2 has data of,
    John REG 80
    HPI $86.75
    FED $16.76
    State $24.54

    Sara REG 36
    HPI $45.75
    FED $56.76
    State $98.54

    Katie REG 14
    HPI $67.75
    FED $56.76
    State $98.54

    I know how to use Vlookup but what I dont know is how to specificy which values to pull into spreadsheet one once Vlookup has found the identical value.

    More specifically, all I need is the HPI #'s which is in a different column and row .

    What I'm trying to get is a command (script?) that says Look at name "Sara", find Sara in the column next to it. Then pull the data thats in column X, row Y.

    However, after I'm done with Sara, the next name will have a different column and row # to which I need the data pulled......

    Any help is appreciated.

    Thank you.

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

    Re: Complicated V Lookup help

    Quote Originally Posted by christianbber View Post
    I'm trying to pull data from spreadsheet 2 into spreadsheet 1.

    Spreadsheet 1 has names in this order,
    John
    Sara
    Katie


    Spreadsheet 2 has data of,
    John REG 80
    HPI $86.75
    FED $16.76
    State $24.54

    Sara REG 36
    HPI $45.75
    FED $56.76
    State $98.54

    Katie REG 14
    HPI $67.75
    FED $56.76
    State $98.54

    I know how to use Vlookup but what I dont know is how to specificy which values to pull into spreadsheet one once Vlookup has found the identical value.

    More specifically, all I need is the HPI #'s which is in a different column and row .

    What I'm trying to get is a command (script?) that says Look at name "Sara", find Sara in the column next to it. Then pull the data thats in column X, row Y.

    However, after I'm done with Sara, the next name will have a different column and row # to which I need the data pulled......

    Any help is appreciated.

    Thank you.
    Maybe better to use INDEX/MATCH

    e.g.

    =INDEX(Shee2!A:C,MATCH(A2,Sheet2!A:A,0)+1,3)

    This looks at table in Sheet2 from columns A:C

    It finds matching name in column A, then goes down 1 more row, and to 3rd column (column C).
    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.

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Complicated V Lookup help

    do you mean something like this?
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    05-31-2012
    Location
    Maine
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Complicated V Lookup help

    I attached a picture of what I'm looking at. I simplified it since my original question .

    It is a VLOOKUP in a sense but now not only does it have to find the same name "Smith", but it has to find the datat value next to "NBCFFT"

    Thank you for your continued help.
    Attached Images Attached Images

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

    Re: Complicated V Lookup help

    Try:

    =INDEX(INDEX($D$1:$D$25,MATCH(A1,$D$1:$D$25,0)):$F$25,MATCH("NBCFFT",INDEX($E$1:$E$25,MATCH(A1,$D$1:$D$25,0)):$E$25,0),3)

    adjust ranges to suit.

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Complicated V Lookup help

    ok like this then
    Attached Files Attached Files

+ 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