Matching text between two column

amitvnarendra

New Member
Joined
Dec 19, 2008
Messages
30
Hi All,

I am looking to search if text column A is preset in column B. How do I go about doing that?

Please see the example below

Column A Column B

Flight to Zante Get cheap tickets
Flights to London Plan your trip to the UK
Flights to Glasgow Get flights to zante
Cheap flights to Flight to London
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
In your example, do the items need to be in the same row? If the match is found, then what do you wish to happen? Does the match need to be the whole phrase or just a word. More information as to what you are trying to do is needed. Your requirement is not specific enough to provide a viable solution.
 
Upvote 0
ABC
1DB0
2DC0
3EF4
4DE0
5BQ1

<tbody>
</tbody>

I have substituted letters for the phrases you have.

In column C I have the following formula which returns the position of any match between column A and Column B. Any non-zero value in C is a duplicate.

Code:
{ =IFNA(MATCH(B2:B6,C2:C6,0),0) }

Note: This only returns the first duplicate (e.g., if you have more than one match in in column 2 the number returned will always be the first. I am sure there is a way to add to the formula to address this, but I don't have time right now to figure it out.
 
Upvote 0
In your example, do the items need to be in the same row? If the match is found, then what do you wish to happen? Does the match need to be the whole phrase or just a word. More information as to what you are trying to do is needed. Your requirement is not specific enough to provide a viable solution.


Thank for asking for more clarification. The items do not need to be in the same row. If the match is found the I just want it to say yes. it has to be the whole phrase. Let me know if you need any further clarification.
 
Upvote 0
If all you need is a "Yes" for any duplicate, then this modification to the formula I posted above will work:

Code:
{ =IFNA(IF(MATCH(B2:B6,C2:C6,0),"Yes"),0) }
 
Upvote 0

Forum statistics

Threads
1,214,986
Messages
6,122,611
Members
449,090
Latest member
vivek chauhan

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