abugharibh
New Member
- Joined
- May 16, 2019
- Messages
- 10
Hello
trying to unhide/hide rows based on cell value. the cell is : N4, and it contains years from 2018-2020
im using this code:
Thanks in advance
trying to unhide/hide rows based on cell value. the cell is : N4, and it contains years from 2018-2020
im using this code:
it does unhide the rows i want , but i dont know how to make it hide all other rows. e.g. when N4=2019 , i want to unhide rows 60:110 but at the same time hide rows 7:57 and 113:163If Target.Address(False, False) = "N4" Then
Select Case Target.Value
Case "2018: Rows("7:57").Hidden = False
Case "2019": Rows("60:110").Hidden = False
Case "2020": Rows("113:163").Hidden = False
End Select
End If
End Sub
Thanks in advance