View Single Post
 
Old 12-02-2014, 04:42 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,342
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Doing this via formulae would be very convoluted and slow. One alternative would be to use a macro to delete the unwanted rows, thus:
Code:
Sub DeleteURLs()
Application.ScreenUpdating = False
Dim LRow As Long, i As Long, j As Long, StrAddr(), bDel As Boolean
StrAddr = Array("soccer", "basketball", "football", "tennis")
With ActiveSheet
  LRow = .UsedRange.Rows.Count
  For i = LRow To 1 Step -1
    bDel = True
    With .Range("A" & i)
      For j = 0 To UBound(StrAddr)
        If InStr(.Value, StrAddr(j)) > 0 Then
          bDel = False
          Exit For
        End If
      Next
      If bDel = True Then
        .EntireRow.Delete
      End If
    End With
  Next
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote