Partial or Full Match entries in column A and B & return YES or NO in column C

frank933

New Member
Joined
Oct 9, 2010
Messages
23
Guys here's my challenge.

I have a sheet in which Column A has full name of the couple.
Column B has some name (could be husband's, could be wife's, could be neither).

"Row by row" I'm trying to compare entry in column B with corresponding entry in column A and return a YES OR NO in Column C if one or multiple words from column B is/are found in column A.

Based on the way I want the formula to work the result should look like the image attached or the sheet shown below

to-be-matched.xlsx
ABC
1Full NameSome NameResult Wanted
2Abud Luiz Carlos MartinezLuiz AbudYES
3Accorinti Juan Carlos & Tatiana Maria RomeroTatiana RomeroYES
4Acosta Carlos & Lydia L TamezLydia TamezYES
5Acosta Carlos Daniel & Ariana GamboaCarlos AcostaYES
6Acosta-Pernia Malleli Del & Carlos OviedoCarlos OviedoYES
7Acy Carlos Orlando & Kimberly DKimberley RusselleYES
8Adams Carlos MKori AdamsNO
9Agnew Carlos A Rivera & Thais TorresWanda MaldonadoNO
10Aguilar CarlosCarlos AguilarYES
11Aguilar Carlos & Katherine Erskine AguilarKeisha JohnsonNO
12Aguilar Carlos & Gail MRobert ReaYES
13Aguilar Carlos & OlgaOlga AguilarYES
14Aguilar Carlos ACarlos AguilarYES
15Aguilera Carlos J & JuanitaVeronica AguileraYES
16Aguilera Carlos Jr & Enriqueta AguileraCarlos AguileraYES
17Aguirre Carlos & MelissaCarlos AguirreYES
18Aguirre Carlos & RaymandaRaymunda AguirreYES
19Alban Carlos E & Rosa MCarlos AlbanYES
20Alegre Carlos A & Rocio Arce OliveraCarlos GutierrezYES
21Allen Carlos & CynthiaCynthia AllenYES
22Balderas Juan Carlos NolascoJuan NolascoYES
23Baldez Christie Friday & Carlos Eduardo VasconcellAmy BonzonNO
24Balladares Carlos Manuel & Mara IzoldaCarlos BalladaresYES
25Barbosa Juan Carlos & Irma EKarla BarbosaYES
26Barcelo Carlos Raul & Alma AAlma BarceloYES
27Barcenas Pedro & Viviana Barcenas Morales & Juan Carlos Barcenas-MoJuan BarcenasYES
28Bardales Carlos M & Bardales Diana A FloresDiana FloresYES
29Barefield Carlos & LisaLisa BarefieldYES
30Barefield Carlos Douglas & Julie Ann HuvalCarlos BarefieldYES
31Barge Carlos HCarlos BargeYES
32Barocio- Leon Carlos H & Maria C Moises- GarciaCarlos LeonYES
33Barrios Carlos Andres & Gamez Neissa Maryann PinzoNeissa PinzongamezYES
34Barron Carlos R & Erin M EstradaCarlos BarronYES
35Barros Juan Carlos & Rossana C BarrosKassandra BarrosYES
36Barroso Carlos Eduardo Terra & Haffner Paula MairaUshma MehtaNO
Sheet1
 

Attachments

  • image.jpg
    image.jpg
    226.4 KB · Views: 4

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
What version of excel are you running?

If it's 365... Also, row 7 has a misspelling of Kimberly.
Book4
ABC
1Full NameSome NameResult Wanted
2Abud Luiz Carlos MartinezLuiz AbudYes
3Accorinti Juan Carlos & Tatiana Maria RomeroTatiana RomeroYes
4Acosta Carlos & Lydia L TamezLydia TamezYes
5Acosta Carlos Daniel & Ariana GamboaCarlos AcostaYes
6Acosta-Pernia Malleli Del & Carlos OviedoCarlos OviedoYes
7Acy Carlos Orlando & Kimberly DKimberley RusselleNo
8Adams Carlos MKori AdamsYes
9Agnew Carlos A Rivera & Thais TorresWanda MaldonadoNo
10Aguilar CarlosCarlos AguilarYes
11Aguilar Carlos & Katherine Erskine AguilarKeisha JohnsonNo
12Aguilar Carlos & Gail MRobert ReaNo
13Aguilar Carlos & OlgaOlga AguilarYes
14Aguilar Carlos ACarlos AguilarYes
15Aguilera Carlos J & JuanitaVeronica AguileraYes
16Aguilera Carlos Jr & Enriqueta AguileraCarlos AguileraYes
17Aguirre Carlos & MelissaCarlos AguirreYes
18Aguirre Carlos & RaymandaRaymunda AguirreYes
19Alban Carlos E & Rosa MCarlos AlbanYes
20Alegre Carlos A & Rocio Arce OliveraCarlos GutierrezYes
21Allen Carlos & CynthiaCynthia AllenYes
22Balderas Juan Carlos NolascoJuan NolascoYes
23Baldez Christie Friday & Carlos Eduardo VasconcellAmy BonzonNo
24Balladares Carlos Manuel & Mara IzoldaCarlos BalladaresYes
25Barbosa Juan Carlos & Irma EKarla BarbosaYes
26Barcelo Carlos Raul & Alma AAlma BarceloYes
27Barcenas Pedro & Viviana Barcenas Morales & Juan Carlos Barcenas-MoJuan BarcenasYes
28Bardales Carlos M & Bardales Diana A FloresDiana FloresYes
29Barefield Carlos & LisaLisa BarefieldYes
30Barefield Carlos Douglas & Julie Ann HuvalCarlos BarefieldYes
31Barge Carlos HCarlos BargeYes
32Barocio- Leon Carlos H & Maria C Moises- GarciaCarlos LeonYes
33Barrios Carlos Andres & Gamez Neissa Maryann PinzoNeissa PinzongamezYes
34Barron Carlos R & Erin M EstradaCarlos BarronYes
35Barros Juan Carlos & Rossana C BarrosKassandra BarrosYes
36Barroso Carlos Eduardo Terra & Haffner Paula MairaUshma MehtaNo
Sheet1
Cell Formulas
RangeFormula
C2:C36C2=IF(COUNT(SEARCH(TEXTSPLIT(B2," "),A2))=0,"No","Yes")
 
Upvote 0
Yes, I am using Excel 365 and we can safely ignore whether or not its a misspell, its part of a large dataset, so it comes that way. If it's a mis-spell and is not found, then so be it.
 
Upvote 0
Your formula works perfectly. I haven't tried on large dataset yet. But it caught the mistake I made in cell c12.
Looks good. thanks so much.
 
Upvote 0
A quick follow up. How would the changed formula look like if value in Column B was an exact match and we wanted to show that in column C as 'Exact Match'. The order of the two consecutive words doesn't matter. For example Carlos Aguilar would be considered the same as Aguilar Carlos
 
Upvote 0
MrExcelPlayground20.xlsx
ABCD
1Full NameSome NameResult WantedFull match of column B in Column A
2Abud Luiz Carlos MartinezLuiz AbudYesYes
3Accorinti Juan Carlos & Tatiana Maria RomeroTatiana RomeroYesYes
4Acosta Carlos & Lydia L TamezLydia TamezYesYes
5Acosta Carlos Daniel & Ariana GamboaCarlos AcostaYesYes
6Acosta-Pernia Malleli Del & Carlos OviedoCarlos OviedoYesYes
7Acy Carlos Orlando & Kimberly DKimberley RusselleNoNo
8Adams Carlos MKori AdamsYesNo
9Agnew Carlos A Rivera & Thais TorresWanda MaldonadoNoNo
10Aguilar CarlosCarlos AguilarYesYes
11Aguilar Carlos & Katherine Erskine AguilarKeisha JohnsonNoNo
12Aguilar Carlos & Gail MRobert ReaNoNo
13Aguilar Carlos & OlgaOlga AguilarYesYes
14Aguilar Carlos ACarlos AguilarYesYes
15Aguilera Carlos J & JuanitaVeronica AguileraYesNo
16Aguilera Carlos Jr & Enriqueta AguileraCarlos AguileraYesYes
17Aguirre Carlos & MelissaCarlos AguirreYesYes
18Aguirre Carlos & RaymandaRaymunda AguirreYesNo
19Alban Carlos E & Rosa MCarlos AlbanYesYes
20Alegre Carlos A & Rocio Arce OliveraCarlos GutierrezYesNo
21Allen Carlos & CynthiaCynthia AllenYesYes
22Balderas Juan Carlos NolascoJuan NolascoYesYes
23Baldez Christie Friday & Carlos Eduardo VasconcellAmy BonzonNoNo
24Balladares Carlos Manuel & Mara IzoldaCarlos BalladaresYesYes
25Barbosa Juan Carlos & Irma EKarla BarbosaYesNo
26Barcelo Carlos Raul & Alma AAlma BarceloYesYes
27Barcenas Pedro & Viviana Barcenas Morales & Juan Carlos Barcenas-MoJuan BarcenasYesYes
28Bardales Carlos M & Bardales Diana A FloresDiana FloresYesYes
29Barefield Carlos & LisaLisa BarefieldYesYes
30Barefield Carlos Douglas & Julie Ann HuvalCarlos BarefieldYesYes
31Barge Carlos HCarlos BargeYesYes
32Barocio- Leon Carlos H & Maria C Moises- GarciaCarlos LeonYesYes
33Barrios Carlos Andres & Gamez Neissa Maryann PinzoNeissa PinzongamezYesNo
34Barron Carlos R & Erin M EstradaCarlos BarronYesYes
35Barros Juan Carlos & Rossana C BarrosKassandra BarrosYesNo
36Barroso Carlos Eduardo Terra & Haffner Paula MairaUshma MehtaNoNo
Sheet1
Cell Formulas
RangeFormula
C2:C36C2=IF(COUNT(SEARCH(TEXTSPLIT(B2," "),A2))=0,"No","Yes")
D2:D36D2=IF(OR(ISERROR(SEARCH(TEXTSPLIT(B2," "),A2))),"No","Yes")
 
Upvote 0
Solution

Forum statistics

Threads
1,224,823
Messages
6,181,184
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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