Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Object Required
There are actually a bunch of errors in the code. It will be hard to debug
without the actual code... Try something more like... Sub DeleteRedPrairie() Dim rng as Range set rng = columns(1).Find("RedPrairie") if not rng is nothing then do rng.EntireRow.Delete set rng = columns(1).Find("RedPrairie") loop while not rng is nothing End if end Sub -- HTH... Jim Thomlinson "Chuck Neal" wrote: Actually, I have the dot in the code....just did not include it here. Sorry I have two computers and the code is on the other one. Still get the error. "Jim Thomlinson" wrote: missing a dot... If Cells(i,1).Value = "RedPrairie" Then -- HTH... Jim Thomlinson "Chuck Neal" wrote: Why do I get "Object Required" with this? What is wrong? I want to delete every row that has "Red Prairie..." in the cell. Sub DeleteRedPrairie () Dim lastrow as Long, i As Long lastrow = Cells(Row.Count, 1) .End(x1Up) .Row For 1 = lastrow To Step -1 If Cells(i,1) Value = "RedPrairie" Then Rows(i).Delete End If Next End Sub I also want to be able to delete the row immediately below the on that contains RedPrairie. Please help....these rows are screwing up everything I do. Also due to concatenate formulas I need to run, I cannot sort this first. Filtering slows down my macros immensely. Chuck |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
R/T 424 - Object required Help | Excel Discussion (Misc queries) | |||
Object Required | Excel Discussion (Misc queries) | |||
Object Required | Excel Programming | |||
Object required? | Excel Programming | |||
Object required. | Excel Programming |