Hi, I need to be able to hide a row if the numbers in column "c" and in column "d" are zero. I the below code works but stops after looping through only 4 rows of data. There is nothing different between the data so I don't know why it stops. Can someone please help me? Thank you.
Sub Hide_Row_3()
' Hide_Row_3 Macro
Worksheets("Costs").Activate
Application.ScreenUpdating = False
Dim rCell As Range
For Each rCell In Range("c7:c18, d7:d18")
If rCell = 0 And rCell(xright) = 0 Then
rCell.EntireRow.Hidden = True
Else
rCell.EntireRow.Hidden = False
End If
Next rCell
Application.ScreenUpdating = True
End Sub