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

TerrorTot38

New Member
Joined
Feb 2, 2022
Messages
21
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
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
Excel Formula:
=VLOOKUP(B2,$A$2:$A$191,1,FALSE)
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.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Welcome to the MrExcel board!

I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with.

Is this what you mean?

22 02 03.xlsm
ABC
1
2Player A & Player BPlayer C & Player APlayer A & Player C
3Player A & Player CPlayer A & Player DPlayer A & Player D
4Player A & Player DPlayer C & Player D#N/A
Match Pairs
Cell Formulas
RangeFormula
C2:C4C2=IFNA(VLOOKUP(B2,$A$2:$A$191,1,FALSE),VLOOKUP(MID(B2&" & "&B2,FIND("&",B2)+2,LEN(B2)),$A$2:$A$191,1,FALSE))
 
Upvote 0
Hi, yes sorry I only have 365 and LibreOffice so could not get the extension to work.

Thank you very much it is working perfectly. If the value doesn't exist at all is there a way for it to show something other that #N/A?

Thanks again,
 
Upvote 0
If the value doesn't exist at all is there a way for it to show something other that #N/A?
Sure, just use another IFNA

=IFNA(IFNA(VLOOKUP(B2,$A$2:$A$191,1,FALSE),VLOOKUP(MID(B2&" & "&B2,FIND("&",B2)+2,LEN(B2)),$A$2:$A$191,1,FALSE)),"Not found")
 
Upvote 0
Solution
Sure, just use another IFNA

=IFNA(IFNA(VLOOKUP(B2,$A$2:$A$191,1,FALSE),VLOOKUP(MID(B2&" & "&B2,FIND("&",B2)+2,LEN(B2)),$A$2:$A$191,1,FALSE)),"Not found")
Thank you soo much this is working perfectly with my nulled data set and proper data set :D Really appreciate your help with this.
 
Upvote 0
You're welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,217
Members
452,619
Latest member
Shiv1198

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top