I'm new to the forum and I have used a lot of great ideas from a lot of the great users on the forum. I know that somone will be able to help me out on this as I have seen alot of what I call complex macros in the forum. So here is my question.
How do I delete rows with a cell value of "0" in a selection I have selected in Excel? I have tried this macro which is I have tweaked from a previous macro that was used to hide "0" in a selection, but it will only delete half of the "0" that I have selected. Here is the macro, can someone please help?
Thank you!!!
Sub H_DeleteRow()
With Application
CalcMode = .Calculation
.Calculation = xlCalculationManual
.ScreenUpdating = False
End With
ActiveSheet.Unprotect
Dim rng As Range, Cell As Range
Set rng = Selection
rng.EntireRow.Hidden = False
For Each Cell In rng
If Cell.Value = "0" Then Cell.EntireRow.Delete
Next Cell
With Application
.Calculation = CalcMode
End With
End Sub
Bookmarks