+ Reply to Thread
Results 1 to 4 of 4

finding data using multiple search criteria

  1. #1
    Registered User
    Join Date
    01-06-2005
    Posts
    2

    Question finding data using multiple search criteria

    I know how to use VLOOKUP to find data from a table using only 1 criteria. However, I need to use two search criteria.

    For example, I have two spreadsheets that I want to take some data from 1 and put it in the other. Spreadsheet 1(small sample)

    playerID nameLast nameFirst yearID teamID lgID salary
    aardsda01 Aardsma David 2004 SFN NL $300,000
    aasedo01 Aase Don 1986 BAL AL $600,000
    aasedo01 Aase Don 1987 BAL AL $625,000
    aasedo01 Aase Don 1988 BAL AL $675,000
    aasedo01 Aase Don 1989 NYN NL $400,000
    abbotje01 Abbott Jeff 1998 CHA AL $175,000
    abbotje01 Abbott Jeff 1999 CHA AL $255,000
    abbotje01 Abbott Jeff 2000 CHA AL $255,000
    abbotje01 Abbott Jeff 2001 FLO NL $300,000


    I have another spreadsheet(small sample) that I want to be able to get the salary info from spreadsheet 1 into the last column. I would like to use the playerID as the number 1 criteria and the year as the second.

    year playerID nameLast nameFirst stint team lg G AB R H 2B 3B HR RBI SB CS BB SO IBB HBP SH SF GIDP AVG OBP SLG salary
    2004 aardsda01 Aardsma David 1 SFN NL 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .000 .000 .000
    1980 aasedo01 Aase Don 1 CAL AL 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .000 .000 .000
    1981 aasedo01 Aase Don 1 CAL AL 39 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .000 .000 .000
    1982 aasedo01 Aase Don 1 CAL AL 24 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .000 .000 .000
    1984 aasedo01 Aase Don 1 CAL AL 23 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .000 .000 .000
    1985 aasedo01 Aase Don 1 BAL AL 54 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .000 .000 .000
    1986 aasedo01 Aase Don 1 BAL AL 66 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .000 .000 .000
    1987 aasedo01 Aase Don 1 BAL AL 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .000 .000 .000
    1988 aasedo01 Aase Don 1 BAL AL 35 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .000 .000 .000
    1989 aasedo01 Aase Don 1 NYN NL 49 5 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 .000 .000 .000
    1990 aasedo01 Aase Don 1 LAN NL 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .000 .000 .000
    2001 abadan01 Abad Andy 1 OAK AL 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .000 .000 .000
    2003 abadan01 Abad Andy 1 BOS AL 9 17 1 2 0 0 0 0 0 1 2 5 0 0 0 0 1 .118 .211 .118
    1980 abbotgl01 Abbott Glenn 1 SEA AL 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .000 .000 .000
    1981 abbotgl01 Abbott Glenn 1 SEA AL 22 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .000 .000 .000
    1983 abbotgl01 Abbott Glenn 1 SEA AL 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .000 .000 .000
    1983 abbotgl01 Abbott Glenn 2 DET AL 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .000 .000 .000





    There are several thousand that I would like to have to have this info for. Does excel do this and how.

  2. #2
    Registered User
    Join Date
    01-06-2005
    Posts
    4

    This May Work

    I'm an admitted Excel hack so excuse the ugliness of this approach. I'm sure there's many others with a much more elegnant way to do this but this may help you.

    Create a common column on worksheet1 as cross reference. For sake of argument, column K and concatenate the playerId and year (=A1&D1). Then use vlookup on worksheet2 using playerID & Year as the lookup value (=vlookup(A1&D1,Worksheet1Range,Col#)

    Make sense? Hope it helps.

  3. #3
    Registered User
    Join Date
    01-06-2005
    Posts
    2
    worked like a charm. Thanks. I never would have thought of that

  4. #4
    Registered User
    Join Date
    01-06-2005
    Posts
    4
    Glad I could help.

+ 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