I want to Hide a Row if the values in multiple cells are equal to 0. I have tried this VBA code, it “works” but at the end the rows with 0 are not being hidden.
Sub Rehien_ausblenden()
Dim i As Integer
Application.ScreenUpdating = False
Worksheets("Daten").Activate
For i = 12 To 45
If Cells(i, 7).Value = 0 And Cells(i, 8).Value = 0 _
And Cells(i, 9).Value = 0 And Cells(i, 10).Value Then
Rows(i).EntireRow.Hidden = True
End If
Next
MsgBox ("Completed")
Application.ScreenUpdating = True
End Sub