Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I fixed the error with the ell instead of the one and it helped, but still
has not fully fixed the problem. I am trying your code Gary but it keeps calculating. "Gary Keramidas" wrote: maybe something like this, start at the bottom and work up Sub test() Dim x As Long Dim lastrow As Long lastrow = Cells(Rows.Count, "A").End(xlUp).Row 'Delete 1 Values from Date Column x = lastrow Do While Cells(x, 1).Value < "" And x 1 If Cells(x, 1) = "1" Then Range("A" & x).Delete Shift:=xlUp x = x - 1 Else x = x - 1 End If Loop End Sub -- 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem with validation deletion/modification | Excel Programming | |||
Problem with Conditional format deletion | Excel Discussion (Misc queries) | |||
Excel Problem in detail/updation, deletion | Excel Programming | |||
Excel VBA - Userform updation/deletion problem | Excel Programming | |||
Row Deletion | Excel Programming |