Delete records with email address

Petercheng

New Member
Joined
Jan 4, 2012
Messages
15
Hi Folks,

I have excel documents where many (thousands) of the cells contain an email address. I need to delete these cells (that contain email address) only from the excel files. Are there any Macro or something that I can use to do so quickly and easily?. (a common feature of the cells is a email address with @ in the cells).

Thanks a lot for your help in advance.
 
Assuming the addresses are in col A

Dim i As Long
Dim LASTROW As Long

LASTROW = Cells(Rows.Count, 1).End(xlUp).Row
' ** Deletes rows where col A value contains the "@" character
For i = LASTROW To 1 Step -1
If InStr(Range("A" & i).Value, "@") Then Range("A" & i).EntireRow.Delete Shift:=xlUp

Next i
 
Upvote 0
they are in a specific column.
11.jpg

Your point being what exactly?
 
Upvote 0

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