+ Reply to Thread
Results 1 to 11 of 11

Tricky Conditional VLookup

  1. #1
    Registered User
    Join Date
    09-21-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2011
    Posts
    10

    Tricky Conditional VLookup

    Hello everyone,

    I have been pulling hairs for the past few hours trying to think of the best way to do this. Firstly see below for a sample of my data.

    Spreadsheet 1

    Column A Column B Column C
    01/01/2000 NY Giants 0.96
    02/01/2000 Dallas 0.98
    02/01/2000 Redskins 0.78


    Spreadsheet 2
    Column A Column B Column C
    01/01/2000 At New York Giants 9
    02/01/2000 At Dallas Cowboys 8
    02/01/2000 At Washington Redskins 7

    So what I want to do is do a vlookup of column A and column B of spreadsheet 1 on spreadsheet 2 so that it returns me column C (from spreadsheet 2). Note the date format is equal in both spreadsheets, however column B only contains part of the text. What is the best way to retrieve column C from spreadsheet 2. In reality, my spreadsheets are very large and contain 5 years worth of historical data and multiple columns.

    Much appreciated for any guidance.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Tricky Conditional VLookup

    Hi
    it would be easier if you posted a sample sheet ( no pics please) - Having to re-type or copy paste data is not my forte.

  3. #3
    Registered User
    Join Date
    09-21-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2011
    Posts
    10

    Re: Tricky Conditional VLookup

    See attached. The spreadsheet has two sheets.Dummy.xlsx

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

    Re: Tricky Conditional VLookup

    =SUMPRODUCT(--(Sheet2!A1:A30=A1),--(ISNUMBER(SEARCH(B1,Sheet2!B1:B30))),Sheet2!C1:C30) would work but you need to have some consistency in names ny giants is not in the string new york giants
    hmm now i see your real workbook it becomes somewhat harder
    "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

  5. #5
    Registered User
    Join Date
    09-21-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2011
    Posts
    10

    Re: Tricky Conditional VLookup

    Thanks for the prompt reply. However that's the problem, there is no consistency in the names. But one spreadsheet will always CONTAIN the team name as per the other spreadsheet and vice versa e.g NY giants vs New York giants or Dallas vs Dallas cowboys or AT Washington Redskins vs Redskins etc.

  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: Tricky Conditional VLookup

    the date formats are entirely different how do you know the year on sheet 2?

  7. #7
    Registered User
    Join Date
    09-21-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2011
    Posts
    10

    Re: Tricky Conditional VLookup

    Dummy.xlsx
    Quote Originally Posted by martindwilson View Post
    the date formats are entirely different how do you know the year on sheet 2?
    That's a different jmatter I have to worry about all together. Anyways the spreadsheets have been fixed. Thanks, still looking for a solution.

  8. #8
    Registered User
    Join Date
    09-21-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2011
    Posts
    10

    Re: Tricky Conditional VLookup

    Any ideas Excel guru's out there?

  9. #9
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,605

    Re: Tricky Conditional VLookup

    Pl see the attached file.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    09-21-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2011
    Posts
    10

    Re: Tricky Conditional VLookup

    Quote Originally Posted by kvsrinivasamurthy View Post
    Pl see the attached file.
    And that is why you are the guru and I am the novice. Thankyou so much sir, I will try to implement this on a greater scale and see how I go. Thumbs Up!

  11. #11
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,605

    Re: Tricky Conditional VLookup

    Welcome. Pl mark the thread SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Tricky conditional formatting
    By ZoharFurman in forum Excel General
    Replies: 1
    Last Post: 10-27-2013, 12:49 PM
  2. [SOLVED] Need help with tricky VLOOKUP
    By jlcarlis in forum Excel General
    Replies: 5
    Last Post: 05-31-2012, 11:49 PM
  3. Tricky Vlookup
    By hiddy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-24-2012, 04:02 AM
  4. Tricky Vlookup?
    By frank933 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-06-2011, 09:18 PM
  5. Replies: 7
    Last Post: 01-09-2006, 09:15 AM

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