Match 2 names EXACLY

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,213
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
2 columns contains names which I am trying to MATCH EXACTLY & get the result "MATCHED" or "NOT MATCHED" in another column.
Rule: First 7 alphabets & last 5 alphabets should MATCH EXACTLY.
Ex:
C3=AAABBBCCCDDDEEEFFFGGG
D3=AAABBBCZZZZFFGGG
E3=MATCHED
In above example: if D3=AAaBBBCZZZZFFGGG, E3="NOT MATCHED"

How to accomplish?
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Hi

In E3:
=IF(AND(EXACT(LEFT(C3,7),LEFT(D3,7)),EXACT(RIGHT(C3,5),RIGHT(D3,5))),"MATCHED","NOT MATCHED")

Vidar
 
Upvote 0
Vidar,

If C3=AFFGGG
If D3=AFFGGG, will it take care?
 
Upvote 0
Hi
It will only work for text strings you specified in your first post.
If you have other text string patterns, then you should list them up together with the results you seek.

Vidar
 
Upvote 0
What to do then? C3 & D3 can have MINIMUM 1 alphabets to MAXIMUM 200 alphabets.
 
Upvote 0
C3=ABCDEFGHI
D3=ABCDEFFFFFFFEFGHI
Rule: FIRST 7 alphabets & LAST 5 alphabets should MATCH EXACTLY.
For C3, FIRST 7=ABCDEFG & LAST 5=EFGHI
For D3, FIRST 7=ABCDEF & LAST 5=EFGHI
So answer=MATCHED
If D3 would have been=ABCDEFGEFGH
For D3, FIRST 7=ABCDEF & LAST 5=GEFGH
So answer=NOT MATCHED
 
Upvote 0
I think this might work...

=IF(OR(LEN(C3)<7,LEN(D3)<7),"NOT MATCHED",IF(AND(EXACT(LEFT(C3,7),LEFT(D3,7)),EXACT(RIGHT(C3,5),RIGHT(D3,5))),"MATCHED","NOT MATCHED"))
 
Upvote 0

Forum statistics

Threads
1,213,489
Messages
6,113,952
Members
448,535
Latest member
alrossman

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