Problem with Deletion
forgot to mention, you had a 1 instead of an l, maybe just a typo getting
the code in the post.
Selection.Delete Shift:=x1Up
--
Gary Keramidas
"Ben" wrote in message
...
I am trying to delete all the 1's from column A, just those cells though,
not
the whole row. I am getting error 1004 on the Selection.Delete line. It
says
Range Class Failed.
Thanks
'Delete 1 Values from Date Column
x = 2
Do While Cells(x, 1).Value < ""
If Cells(x, 1) = "1" Then
Range("A" & x).Select
Selection.Delete Shift:=x1Up
x = x + 1
Else
x = x + 1
End If
Loop
Thanks
|