ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleting data (https://www.excelbanter.com/excel-programming/368822-deleting-data.html)

blander[_4_]

Deleting data
 

Hi guys,

I have a list of contacts, including email addresses.

I have a list of email addresses (seperate from the main list) which
want to delete from the main list, due to being out of date. Obviously
want to remove these emails from the main list.

Is there a macro that i can use which will delete the values from on
colum in one sheet if they exist in another colum in another sheet??

Cheers

--
blande
-----------------------------------------------------------------------
blander's Profile: http://www.excelforum.com/member.php...fo&userid=3648
View this thread: http://www.excelforum.com/showthread.php?threadid=56657


Bob Phillips

Deleting data
 

For i = Cells(Rows.Count,"A").End(xlUp).Row To 1 Step -1
If Not IsError(Appliction.Match(Cells(I,"A").Value,
Sheet2!Columns(1),0)) Then
Rows(i).Delete
End If
Next i

chnge the columns to suit

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"blander" wrote in
message ...

Hi guys,

I have a list of contacts, including email addresses.

I have a list of email addresses (seperate from the main list) which i
want to delete from the main list, due to being out of date. Obviously i
want to remove these emails from the main list.

Is there a macro that i can use which will delete the values from one
colum in one sheet if they exist in another colum in another sheet??

Cheers,


--
blander
------------------------------------------------------------------------
blander's Profile:

http://www.excelforum.com/member.php...o&userid=36486
View this thread: http://www.excelforum.com/showthread...hreadid=566578




blander[_5_]

Deleting data
 

Cheers, thankyou :)


--
blander
------------------------------------------------------------------------
blander's Profile: http://www.excelforum.com/member.php...o&userid=36486
View this thread: http://www.excelforum.com/showthread...hreadid=566578



All times are GMT +1. The time now is 04:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com