Hi Smitty7,
Try this while on the tab to have the items deleted, though initially from a copy of data as the results cannot be undone if they're not as expected:
Option Explicit
Sub Macro1()
'http://www.excelforum.com/excel-programming/846630-delete-rows-based-on-data-in-separate-worksheet.html
Dim lngMyCol As Long, _
lngMyRow As Long
lngMyCol = Cells.Find("*", SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Column + 1
lngMyRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Application.ScreenUpdating = False
With Columns(lngMyCol)
With Range(Cells(1, lngMyCol), Cells(lngMyRow, lngMyCol))
.Formula = "=IF(ISERROR(VLOOKUP(LEFT(MID(A1,SEARCH(""http"",A1),255),SEARCH(""["",MID(A1,SEARCH(""http"",A1)+1,255))),Sheet2!A:A,1,FALSE)),"""",""DEL"")"
.Value = .Value
End With
.Replace "DEL", "#N/A", xlWhole
On Error Resume Next 'Turn error reporting off - OK to ignore 'No cells found' message
.SpecialCells(xlCellTypeConstants, xlErrors).EntireRow.Delete
On Error GoTo 0 'Turn error reporting back on
.Delete
End With
Application.ScreenUpdating = True
End Sub
Regards,
Robert
Bookmarks