View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Object Required

I think in

Cells(Row.Count, 1) .End(x1Up) .Row

Row s/b Rows and x1up s/b xlup (as previously mentioned)

also

For 1 = lastrow To Step -1

s/b For i = lastrow to 1 step -1




"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