Guest User

Untitled

a guest
May 25th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. Sub HideDoubleZeors()
  2.  
  3. Dim LR As Long, i As Long
  4. Dim c As Variant
  5.  
  6. For Each ws In Worksheets
  7. Select Case ws.Name
  8. Case "Form1", _
  9. "Form 2", _
  10. "Form 3"
  11. 'Do nothing on these tabs
  12.  
  13. Case Else 'If not one of the above tab names then do this
  14. With ws.Activate
  15. LR = ws.Range("B" & Rows.Count).End(xlUp).Row
  16. For i = 1 To LR
  17. With ws.Range("B" & i)
  18. For Each c In Range("B" & i)
  19. If c.Value <> "All Forms" _
  20. And c.Value <> "Week One All Forms" _
  21. And c.Offset(0, 1).Value = 0 _
  22. And c.Offset(0, 1).Value <> vbNullString _
  23. And c.Offset(0, 2).Value = 0 _
  24. And c.Offset(0, 2).Value <> vbNullString _
  25. Then Rows(c.Row).Hidden = True
  26. Next c
  27.  
  28. End With
  29. Next i
  30. End With
  31. End Select
  32. Next ws
  33. End Sub
Add Comment
Please, Sign In to add comment