Compare Columns and Delete Emails from a ROW

Blessy Clara

Board Regular
Joined
Mar 28, 2010
Messages
201
Hi I have an excel sheet with two columns
Column 1 - is OLD
Column 2 - is NEW

I would like to compare the NEW email with emails in OLD column, and if it found in OLD data then remove it in New column

Example as this [TABLE="width: 500"]
<tbody>[TR]
[TD]OLD[/TD]
[TD]NEW[/TD]
[TD]Result[/TD]
[/TR]
[TR]
[TD]xyz@bbec.com[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]abc@gmaa.com|cde@dca.com[/TD]
[TD]mam@ma.com|da@da.com|ee@ee.com|cde@dca.com[/TD]
[TD]mam@ma.com|da@da.com|ee@ee.com|[/TD]
[/TR]
[TR]
[TD]123@outlk.com[/TD]
[TD]123@outlk.com[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Thanks in advance
Email formats have been mimicked to avoid privacy issues
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
How about
Code:
Function BlessyClara(St1 As String, st2 As String) As String
   Dim Sp As Variant
   Dim i As Long
   Sp = Split(St1, "|")
   BlessyClara = "|" & st2
   For i = 0 To UBound(Sp)
      BlessyClara = Replace(BlessyClara, "|" & Sp(i), "")
   Next i
   BlessyClara = Replace(BlessyClara, "|", "", 1, 1)
End Function
Used like
=BlessyClara(A2,B2)
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,880
Messages
6,175,152
Members
452,615
Latest member
bogeys2birdies

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