Advertisement
YasserKhalil2019

T4413_Hide Columns With Friday Saturday Dates

Dec 13th, 2019
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. https://excel-egy.com/forum/t4413
  2. ---------------------------------
  3.  
  4. Sub Hide_Columns_With_Friday_Saturday_Dates()
  5. Dim c As Long
  6.  
  7. Application.ScreenUpdating = False
  8. For c = 733 To 980 Step 8 'ABE To AKR
  9. If Weekday(Cells(7, c).Value) = 6 Or Weekday(Cells(7, c).Value) = 7 Then
  10. Columns(c).Resize(, 8).EntireColumn.Hidden = True
  11. End If
  12. Next c
  13. Application.ScreenUpdating = True
  14. End Sub
  15.  
  16. Sub Show_All_Columns()
  17. Application.ScreenUpdating = False
  18. Columns("ABE:AKR").Hidden = False
  19. Application.ScreenUpdating = True
  20. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement