Hi all,
I have the following VBA code that I am having issues with, ive pieced it together from various sources but it doesn't quite work as it should...
Basically H6 will only be either A, B or Blank.
Depending on the selection in H6, certain rows need to be visible.
H6 by default will be blank, and rows 9:32 need to be hidden from the off.
Any help would be appreciated and I am sure this will be a quick fix for someone!
Thanks in advance!
I have the following VBA code that I am having issues with, ive pieced it together from various sources but it doesn't quite work as it should...
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Not Intersect(Range("H6"), Target) Is Nothing Then
Select Case UCase(Range("H6").Value)
Case ""
Rows("9:32").Hidden = True
Case "A"
Rows("9:19").Hidden = True
Case "B"
Rows("20:32").Hidden = False
End Select
End If
Application.ScreenUpdating = True
End Sub
Basically H6 will only be either A, B or Blank.
Depending on the selection in H6, certain rows need to be visible.
H6 by default will be blank, and rows 9:32 need to be hidden from the off.
Any help would be appreciated and I am sure this will be a quick fix for someone!
Thanks in advance!