Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Q: delete rows
Hello,
I have an excel file and I want to write a macro that delete all the rows if D,E,F columns have zero values. Can anyone give me a code for this? Thanks, |
#2
|
|||
|
|||
This code is designed to delete the row if the columns D,E and F have a 0
value (not a blank). Sub Macro1() Dim i As Long Dim c As Integer c = 0 Application.ScreenUpdating = False For i = 1 To 65536 If Range("D" & i).Value = c And Range("E" & i).Value = c And Range("F" & i).Value = c Then Rows(i & ":" & i).Select Selection.Delete Shift:=xlUp End If Next i Application.ScreenUpdating = True End Sub "JIM.H." wrote: Hello, I have an excel file and I want to write a macro that delete all the rows if D,E,F columns have zero values. Can anyone give me a code for this? Thanks, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can we delete rows permanently from excel sheet | Excel Discussion (Misc queries) | |||
In a protected worksheet allow users to delete rows | Excel Worksheet Functions | |||
How do I find duplicate rows in a list in Excel, and not delete it | Excel Discussion (Misc queries) | |||
Protect Worksheet but allow to insert or delete rows | Excel Discussion (Misc queries) | |||
How to delete blank rows | Excel Discussion (Misc queries) |