I have the following macro and I want to expand it to include more conditions. For example, I want to say that if G5 = No, then hide rows 14:16 or if G5=U, then hide rows 18:19. In other words, I want to add more conditions.
How do I write this code((I know I'm a stupid, I need to buy a VBA book). Here's an example of the functional macro I have:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("G5")) Is Nothing Then
If UCase(Target) = "Y" Then
Rows("8:11").EntireRow.Hidden = True
Rows("8:11").EntireRow.Hidden = False