+ Reply to Thread
Results 1 to 12 of 12

Searching for data in two lists player a & player b the same as player b & player a

  1. #1
    Registered User
    Join Date
    01-19-2022
    Location
    Preston, England
    MS-Off Ver
    Office365
    Posts
    11

    Searching for data in two lists player a & player b the same as player b & player a

    I have two lists of data one has all the pairings (column A) one has my pairings for the next week (column B).

    I am using vlookup
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    to compare the two lists which is working correctly as its showing the names that appear the way in the search list. However some pairings do not appear for example Player A & Player B but in my search list its Player B & Player A.

    Is there a function / formula that will allow for both as I have tried a wild card to no avail.
    Attached Files Attached Files

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Searching for data in two lists player a & player b the same as player b & player a

    To find the index in A2:A191 for the match in B2, I used the following for Office365:

    Please Login or Register  to view this content.
    If it doesn't find a match for the original content, it will swap the players names around and search again. I'm trying to be defensive since I suspect you'll have real names and not "PlayerA" etc.

    WBD
    Office 365 on Windows 11, looking for rep!

  3. #3
    Registered User
    Join Date
    01-19-2022
    Location
    Preston, England
    MS-Off Ver
    Office365
    Posts
    11

    Re: Searching for data in two lists player a & player b the same as player b & player a

    Hi thank you for looking into this. Yes for the purpose of the post I have nulled out the data.

    I have just tried to copy the code from above into column C but it comes up with:

    #VALUE!
    PlayerA & PlayerC
    PlayerB & PlayerE
    PlayerC & PlayerH
    PlayerA & PlayerM
    #VALUE!
    #VALUE!
    #VALUE!
    #VALUE!
    #VALUE!
    #VALUE!

    Where the ones with #Value! are where they don't appear like with the Vlookup. For example PlayerB & PlayerA I'm searching but its PlayerA & PlayerB in the enquiry list.

    Thanks again

  4. #4
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Searching for data in two lists player a & player b the same as player b & player a

    OK. It's tricky when I'm not working with the actual data. I made the assumption that the two player names are separated with the exact text " & ".

    See attached for a hopefully working version from your original data.

    WBD
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-19-2022
    Location
    Preston, England
    MS-Off Ver
    Office365
    Posts
    11

    Re: Searching for data in two lists player a & player b the same as player b & player a

    No problem at all and I appreciate your time. However it's still showing some #value! for some in the spreadsheet attached. Thanks again

  6. #6
    Registered User
    Join Date
    02-02-2022
    Location
    JAPAN
    MS-Off Ver
    2021
    Posts
    8

    Re: Searching for data in two lists player a & player b the same as player b & player a

    I'm not good at English.
    If the problem has already been resolved, ignore it.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-19-2022
    Location
    Preston, England
    MS-Off Ver
    Office365
    Posts
    11

    Re: Searching for data in two lists player a & player b the same as player b & player a

    Thank you very much this is working perfectly. However if the pairing doesn't exist it shows as #N/A is there anyway of showing a message such as FALSE or Already Paired?

  8. #8
    Registered User
    Join Date
    02-02-2022
    Location
    JAPAN
    MS-Off Ver
    2021
    Posts
    8

    Re: Searching for data in two lists player a & player b the same as player b & player a

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    01-19-2022
    Location
    Preston, England
    MS-Off Ver
    Office365
    Posts
    11

    Re: Searching for data in two lists player a & player b the same as player b & player a

    Thank you very much this is working perfectly

  10. #10
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Searching for data in two lists player a & player b the same as player b & player a

    Glad you got this working. No idea why my solution wasn't working - it was fine on my implementation of O365. Small and probably unlikely word of warning with the formula from y-yusuke is that it's not using exact match so if you have two players called, say, "John Jacks" and "John Jackson", it might get confused and return incorrect results. i.e. one player's name is contained in another name.

    WBD

  11. #11
    Registered User
    Join Date
    01-19-2022
    Location
    Preston, England
    MS-Off Ver
    Office365
    Posts
    11

    Re: Searching for data in two lists player a & player b the same as player b & player a

    Do you have the solution in a file as happy to try again. Thank you for the warning is regards to the solution. Is there a way so it doesn't happen so it treats Jess and Jessica or Jen and Jennifer as different values.

  12. #12
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Searching for data in two lists player a & player b the same as player b & player a

    I attached the file back in post #4. This was working for me so I'm not sure why it didn't work for you. One other alternative would be:

    Please Login or Register  to view this content.
    WBD

+ 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. Replies: 9
    Last Post: 07-30-2020, 05:15 PM
  2. Help with data for hockey player stats....
    By Hockeyfan1985 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-26-2018, 10:19 PM
  3. Replies: 8
    Last Post: 02-01-2018, 08:32 PM
  4. Replies: 6
    Last Post: 02-25-2009, 02:12 AM
  5. [SOLVED] Media Player versus Windows Media Player
    By teepee in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-15-2005, 02:05 PM
  6. Media Player versus Windows Media Player
    By teepee in forum Excel General
    Replies: 1
    Last Post: 10-13-2005, 10:05 PM
  7. [SOLVED] Media Player versus Windows Media Player
    By teepee in forum Excel General
    Replies: 1
    Last Post: 10-13-2005, 10:05 PM

Tags for this Thread

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