Sub DeleteDataRow()
Dim lRw As Long
lRw = Cells(Rows.Count, "A").End(xlUp).Row
lRw = Application.Max(lRw, 6)
Range("A6:D" & lRw).ClearContents
End Sub
with a simple modification.Check whether this helps you
Code:Sub DeleteDataRow() Dim lRw As Long lRw = Cells(Rows.Count, "A").End(xlUp).Row Range("A6:D" & lRw).ClearContents End Sub
Sub DeleteDataRow()
Dim lRw As Long
lRw = Cells(Rows.Count, "A").End(xlUp).Row
Range("A6:D6" & lRw).ClearContents
End Sub
I would think this should work as well...with a simple modification.Works fine.Code:Sub DeleteDataRow() Dim lRw As Long lRw = Cells(Rows.Count, "A").End(xlUp).Row Range("A6:D6" & lRw).ClearContents End Sub
Sub DeleteRows()
Range("A6:D" & Rows.Count).ClearContents
End Sub
This works well. How can be linked with conditional, e.g. execute code if A:A = 0I would think this should work as well...
Code:Sub DeleteRows() Range("A6:D" & Rows.Count).ClearContents End Sub
This works well. How can be linked with conditional, e.g. execute code if A:A = 0
What does A:A=0 mean to you... all cells, including A1 through A5, down to the bottom of data, all have a physical zero in them?
Total column is equal to zero.
Yes, All cells. 1 to last cell. A:AAll cells? Down to Row 1038576??? Or just down to the bottom of data (like I asked in my last message)?