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

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
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
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]D[/TD]
[TD]B[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]D[/TD]
[TD]C[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]B[/TD]
[TD]Q[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]

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,223,977
Messages
6,175,753
Members
452,667
Latest member
vanessavalentino83

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