Save those list of entries in another sheet, say Sheet2. Then use
Dim varArray
varArray = Worksheets(Sheet2).Range(A1:A1000).Value2
Then do
For Each Str In varArray
On Wed, Aug 7, 2013 at 11:40 PM, Spencer Patterson
williamspencerpatter...@gmail.com wrote:
In my excel sheet, I have an
Sub longfunction()
Dim varArray
varArray = Worksheets(Sheet2).Range(A1:A1000).Value2
Do
For Each Str In varArray
If InStr(1, Selection, Str) 0 Then Selection.EntireRow.Delete
If InStr(1, UCase(Selection), Ucase(Str)) 0 Then
Selection.EntireRow.Delete
Next
Selection.Offset(1, 0).Select
Loop
To accomodate that, the easiest way is to put your keyword to a sheet,
Let say your array placed in sheet named MyArrayInSheet starting on
range A1 to A1000, then use this function :
Sub Button1_Click()
Dim Rng As Range
ActiveSheet.Range(A1).Select
Do
For Each Rng In
Sub Button1_Click()
Dim Rng As Range, Str
Range(A1).Select
Do
For Each Str In Array(Friendly's, Ruth's Chris Steak House,
Hooters, Ruby Tuesday, Chili's Grill Bar)
If InStr(1, Selection, Str) 0 Then Selection.EntireRow.Delete
Next
Try to change to Uppercase or Lowercase the test string and the sentences
In Ex:
If InStr(1, UCase(Selection), Ucase(Str)) 0 Then
Selection.EntireRow.Delete
Pada 06/08/2013 23:41, Spencer Patterson menulis:
Aside from the crazy windings text, that did the trick! Thank you so much!
Is
Thank you!
But I ran into one last problem with the code...
The amount of entries in the array string are too long, can I load a csv or
text file to fill the array? I have about 900 lines/phrases/items.
It wont let me use that big of an array or too many line continuations.
Help? =)
On
Please give us a sample attachment that close to your probem, soo we can
find the best method for it
Pada 07/08/2013 12:04, Spencer Patterson menulis:
Thank you!
But I ran into one last problem with the code...
The amount of entries in the array string are too long, can I load a
csv or text
I am trying to make a macro that deletes a row in a column if it detects a
specific word or phrase from a set of phrases.
Friendly's
Ruth's Chris Steak House
Hooters
Ruby Tuesday
Chili's Grill Bar
etc.
I have searched for HOURS to find an answer and have tried combining code
from other