Delete rows from list on another sheet?

WERNER SLABBERT

Board Regular
Joined
Mar 3, 2009
Messages
104
Hi All
I have on sheet 1 a whole contacts database. eg : Column "A" contains Names "B" telefone numbers "C" emails. ext. on Sheet 3 i have a list of emails. how can i have a macro or something lookup the mail list on sheet 3 and delete the corresponding ROW on sheet 1 ?:warning:
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Try

Code:
Sub test()
Dim LR As Long, i As Long
With Sheets("Sheet1")
    LR = .Range("A" & Rows.Count).End(xlUp).Row
    For i = LR To 1 Step -1
        With .Range("C" & i)
            If IsNumeric(Application.Match(.Value, Sheets("Sheet3").Columns("A"), 0)) Then .EntireRow.Delete
         End With
    Next i
End With
End Sub
 
Upvote 0
Press ALT + F11 to open the Visual Basic Editor. Select Module from the Insert menu and paste the code into the white space on the right. Press ALT + Q to close the code window. Tools > Macro > Macros, click on test then click the Run button.
 
Upvote 0

Forum statistics

Threads
1,223,098
Messages
6,170,106
Members
452,302
Latest member
TaMere

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