abhisharma1
New Member
- Joined
- Sep 5, 2021
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
Hi Team,
I need vba macro to hide the rows based on drop down values. If the value is Simple in drop down it should hide the rows from 34 to 41 and if we select other values that it should not hide the rows.
Private Sub Worksheet_Change(ByVal Target As Range)
With ActiveSheet
If Target.Address = "$C$17" Then
ase False
Simple = Target.Value
c = 29
Do
erh = True
If .Cells(c, "C") = Simple Then erh = False
.Rows(c - 3 & ":" & c).EntireRow.Hidden = erh
c = c + 4
Loop Until .Cells(c, "C") = Empty
End If
End With
ase True
End Sub
Private Sub ase(ss)
With Application
.EnableEvents = ss
.ScreenUpdating = ss
End With
End Sub
I need vba macro to hide the rows based on drop down values. If the value is Simple in drop down it should hide the rows from 34 to 41 and if we select other values that it should not hide the rows.
Private Sub Worksheet_Change(ByVal Target As Range)
With ActiveSheet
If Target.Address = "$C$17" Then
ase False
Simple = Target.Value
c = 29
Do
erh = True
If .Cells(c, "C") = Simple Then erh = False
.Rows(c - 3 & ":" & c).EntireRow.Hidden = erh
c = c + 4
Loop Until .Cells(c, "C") = Empty
End If
End With
ase True
End Sub
Private Sub ase(ss)
With Application
.EnableEvents = ss
.ScreenUpdating = ss
End With
End Sub