NASCONDERE RIGHE CON VBA IN EXCEL
CODICE VBA USATO NELL'ESEMPIO CHE PUOI SCARICARE:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1")) Is Nothing Then
Range("A29:A90").EntireRow.Hidden = False
Select Case Target
Case "PRIMO"
Range("A33:A90").EntireRow.Hidden = True
Case "SECONDO"
Range("A48:A90").EntireRow.Hidden = True
Range("A29:A30").EntireRow.Hidden = True
Case "TERZO"
Range("A70:A90").EntireRow.Hidden = True
Range("A29:A46").EntireRow.Hidden = True
Case "QUARTO"
Range("A29:A68").EntireRow.Hidden = True
End Select
End If
End Sub
If Not Intersect(Target, Range("A1")) Is Nothing Then
Range("A29:A90").EntireRow.Hidden = False
Select Case Target
Case "PRIMO"
Range("A33:A90").EntireRow.Hidden = True
Case "SECONDO"
Range("A48:A90").EntireRow.Hidden = True
Range("A29:A30").EntireRow.Hidden = True
Case "TERZO"
Range("A70:A90").EntireRow.Hidden = True
Range("A29:A46").EntireRow.Hidden = True
Case "QUARTO"
Range("A29:A68").EntireRow.Hidden = True
End Select
End If
End Sub