Re: $$Excel-Macros$$ Macro to delete row with specific phrase

2013-08-07 Thread De Premor
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 Sheet

Re: $$Excel-Macros$$ Macro to delete row with specific phrase

2013-08-07 Thread Spencer Patterson
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 L

Re: $$Excel-Macros$$ Macro to delete row with specific phrase

2013-08-07 Thread Sam Mathai Chacko
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

Re: $$Excel-Macros$$ Macro to delete row with specific phrase

2013-08-07 Thread Spencer Patterson
In my excel sheet, I have an array but the amount of entries is close to 1,000 separate items. I am limited to 255 / too many line continuations. Would calling a file or creating a dictionary/collection be best to implement into the array? Sub longfunction() Dim Rng As Range, Str Ra

Re: $$Excel-Macros$$ Macro to delete row with specific phrase

2013-08-06 Thread De Premor
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

Re: $$Excel-Macros$$ Macro to delete row with specific phrase

2013-08-06 Thread Spencer Patterson
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 Tue

Re: $$Excel-Macros$$ Macro to delete row with specific phrase

2013-08-06 Thread De Premor
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 the

Re: $$Excel-Macros$$ Macro to delete row with specific phrase

2013-08-06 Thread Spencer Patterson
Aside from the crazy windings text, that did the trick! Thank you so much! Is there a way to make is so that case does not matter? "Curves" "curves" "CURVES" So they all get deleted? -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join offi

Re: $$Excel-Macros$$ Macro to delete row with specific phrase

2013-08-06 Thread De Premor
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 S

$$Excel-Macros$$ Macro to delete row with specific phrase

2013-08-05 Thread Spencer Patterson
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