![]() |
|
|
|
#1
|
||||
|
||||
|
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] |
|
#2
|
|||
|
|||
|
First, thanks for the reply.
Though I am not very familiar with excel and do not know how to use macros. Could you explain exactly how I apply to this code? Is the somewhere specific in excel where I need copy and paste it? |
|
| Tags |
| bulk, extract |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
how can i restrict my account on outlook to send email only to a specific domain?
|
kclark | Outlook | 3 | 10-19-2014 06:21 PM |
Need VBA For Macro On How To Remove Specific Words
|
netchie | Word VBA | 6 | 08-28-2012 03:37 PM |
VBA code to extract specific bookmarks from multiple word files
|
Rattykins | Word VBA | 4 | 06-27-2012 10:02 PM |
| Can't send to specific domain | gilligan1961 | Outlook | 19 | 02-18-2011 01:53 PM |
| How would I bulk select and copy highlights and then bulk paste them automatically? | copywriterpro | Word | 0 | 04-19-2010 05:21 AM |