Hi Guys,
Please help with this VBA code.
I have values in Columns C & D - cells 20 to 40
I need to check if both values in C20 and D20; C21 and D21; C22 and D22 etc.., are zero, then hide the rows (current row that contain zero and other rows up to row 40).
I have found similar code on the forum, but this checks only one cell. Please help guys! Thanks!
Sub HideRows()
Application.ScreenUpdating = False
Application.Calculation = xlManual
For Each c In Range("C20:C40")
If c.Value = 0 Then Rows(c.Row).Hidden = True
Next
Application.Calculation = xlAutomatic
Application.ScreenUpdating = True
End Sub
Bookmarks