View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jarek Kujawa[_3_] Jarek Kujawa[_3_] is offline
external usenet poster
 
Posts: 37
Default Need help with Macro

Sub hhide_uunhide

With Range("L62")
If .Value = 0 Then
Range("63:147").EntireRow.Hidden = True
Elseif .Value = 1 Then
Range("63:69").EntireRow.Hidden = False
ElseIf .Value = 2 Then
Range("63:75").EntireRow.Hidden = True
....
End If
End With

End Sub

continue the ElseIf clause for the remaining ranges/rows where "..."




Użytkownik "Leiprecht" napisał w
wiadomości ...
How do i get it to due the following

IF L62 = 0 Hide Rows 63:147
IF L62 = 1 Unhide Rows 63:69
IF L62 = 2 Unhide Rows 63:75
If L62 = 3 Unhide Rows 63:81
If L62 = 4 Unhide Rows 63:87
If L62 = 5 Unhide Rows 63:93
If L62 = 6 Unhide Rows 63:99
If L62 = 7 Unhide Rows 63:105
If L62 = 8 Unhide Rows 63:111
If L62 = 9 Unhide Rows 63:117
If L62 = 10 Unhide Rows 63:123
If L62 = 11 Unhide Rows 63:129
If L62 = 12 Unhide Rows 63:135
If L62 = 13 Unhide Rows 63:141
If L62 = 14 Unhide Rows 63:147