Compare 2 column of names

shimaa01234

Active Member
Joined
Jun 24, 2014
Messages
446
I want to write "Yes" if match the first name of the column "A" with the first name of the column "B"
And write "Yes" if the two match the name of the column "A" with a name of the column "b" etc. .........
And writing "no" if you do not similar to anything of Name

NAME1NAME2RESULT
AAABBAACYES
CABCDCHIJKYES
FGLMDSERNO
XYUZXYUZYES

<colgroup><col><col><col></colgroup><tbody>
</tbody>
 
You are a wonderful person
Thank you very much for your generosity
The formula works like a charm.
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Unfortunately, Mister "Snakehipes"
You could modify the formula so that given "Yes" with similarity of the first three names , to be among them First Name
 
Upvote 0
Do you mean for a YES the first name should always be matched? If the first name does not match then NO regardless of any other matches?


Excel 2007
ABC
1NAME1NAME2RESULT
2Peter Gabriel MikhailPeter Gabriel MikhailYES
3Gabriel Peter MikhailPeter Gabriel MikhailNo
4Tom Gabriel MikhailPeter Gabriel MikhailNo
5Peter Mickey MousePeter Gabriel Mikhail?????
Sheet2


If the above not correct then please give example.
 
Upvote 0
I have to say that I am confused.

In my post #14 ...... are the example results in C2:C4 as you would expect?

Also please confirm what result you would want in C5 YES or No ?
 
Upvote 0
Then all you are wanting is to match the first name or not ???????

In which case there is no need for a UDF and below is an example of how you might use standard formulas.

Excel 2007
ABC
1NAME1NAME2RESULT
2Peter Gabriel MikhailPeter Gabriel MikhailYES
3Gabriel Peter MikhailPeter Gabriel MikhailNO
4Tom Gabriel MikhailPeter Gabriel MikhailNO
5Peter Mickey MousePeter Gabriel MikhailYES
Sheet2
Cell Formulas
RangeFormula
C2=IF(OR(A2="",B2=""),"",IF(LEFT(A2,SEARCH(" ",A2&" ",1))=LEFT(B2,SEARCH(" ",B2&" ",1)),"YES","NO"))


I remain... 'Confused of Coventry'
 
Upvote 0

Forum statistics

Threads
1,215,636
Messages
6,125,959
Members
449,276
Latest member
surendra75

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