Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try this. Or, sort and delete (you can record a macro to do that too)
for i= cells(rows.count,1).end(xlup).row to 10 step-1 if cells(i,1)=0 then rows(i).delete next i -- Don Guillett SalesAid Software "Ben" wrote in message ... Hello, I'm very new to writing macros with the Visual Basic editor, so I was wondering if someone could help me figure out why nothing happens when I run the following macro: Sub RowDeletingMacro() x = 10 Do While Cells(x, 1).Value < "" If Cells(x, 1).Value = 0 Then Cells(x, 1).Rows(x).Select Selection.Delete Shift:=xlUp End If x = x + 1 Loop End Sub My goal with this macro is to delete all rows in my worksheet that have "0" as an entry in the first column, and to skip over all of the rows that do not have 0 as their first column entry. Any help would be greatly appreciated, thanks very much, Ben |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Loop Problem | Excel Programming | |||
Macro - Loop/automatization problem | Excel Programming | |||
For Loop Problem | Excel Programming | |||
Problem adding charts using Do-Loop Until loop | Excel Programming | |||
For Next loop problem | Excel Programming |