Advertisement
Guest User

Untitled

a guest
Feb 20th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2.   If Range("$A$1").Value = "Scanstation P50" Then
  3.     ResetHiddenRows()
  4.  
  5.     Rows("23:43").EntireRow.Hidden = True
  6.   End If
  7.  
  8.   If Range("$A$1").Value = "Scanstation P40" Then
  9.     ResetHiddenRows()
  10.  
  11.     Rows("10:21").EntireRow.Hidden = True
  12.     Rows("35:48").EntireRow.Hidden = True
  13.   End If
  14.  
  15.   If Range("$A$1").Value = "Scanstation P30" Then
  16.     ResetHiddenRows()
  17.  
  18.     Rows("10:35").EntireRow.Hidden = True
  19.   End If
  20. End Sub
  21.  
  22. Private Sub ResetHiddenRows()
  23.   Rows("1:48").EntireRow.Hidden = False
  24. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement