Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub HideDoubleZeors()
- Dim LR As Long, i As Long
- Dim c As Variant
- For Each ws In Worksheets
- Select Case ws.Name
- Case "Form1", _
- "Form 2", _
- "Form 3"
- 'Do nothing on these tabs
- Case Else 'If not one of the above tab names then do this
- With ws.Activate
- LR = ws.Range("B" & Rows.Count).End(xlUp).Row
- For i = 1 To LR
- With ws.Range("B" & i)
- For Each c In Range("B" & i)
- If c.Value <> "All Forms" _
- And c.Value <> "Week One All Forms" _
- And c.Offset(0, 1).Value = 0 _
- And c.Offset(0, 1).Value <> vbNullString _
- And c.Offset(0, 2).Value = 0 _
- And c.Offset(0, 2).Value <> vbNullString _
- Then Rows(c.Row).Hidden = True
- Next c
- End With
- Next i
- End With
- End Select
- Next ws
- End Sub
Add Comment
Please, Sign In to add comment