I
ivory_kitten
I currently have the code below in my worksheet, surely I can use consistent
coding to get what I need. I need to be able to show/hide various rows
(sometimes single rows, sometimes blocks of rows and sometimes multiple rows
not in order) which sometimes is based on a cell being empty, a cell being a
set value/not a set value or being any value (not blank)
Any suggestions for improvements?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
Set rng = Me.Range("E27")
If Not Intersect(rng, Target) Is Nothing Then
Rows(31).EntireRow.Hidden = IsEmpty(rng.Value)
Rows(39).EntireRow.Hidden = IsEmpty(rng.Value)
End If
Select Case UCase(Range("B6").Value)
Case "PBO"
[35:36].EntireRow.Hidden = True
[47:48].EntireRow.Hidden = True
Case Else
[35:36].EntireRow.Hidden = False
[47:48].EntireRow.Hidden = False
End Select
End Sub
coding to get what I need. I need to be able to show/hide various rows
(sometimes single rows, sometimes blocks of rows and sometimes multiple rows
not in order) which sometimes is based on a cell being empty, a cell being a
set value/not a set value or being any value (not blank)
Any suggestions for improvements?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
Set rng = Me.Range("E27")
If Not Intersect(rng, Target) Is Nothing Then
Rows(31).EntireRow.Hidden = IsEmpty(rng.Value)
Rows(39).EntireRow.Hidden = IsEmpty(rng.Value)
End If
Select Case UCase(Range("B6").Value)
Case "PBO"
[35:36].EntireRow.Hidden = True
[47:48].EntireRow.Hidden = True
Case Else
[35:36].EntireRow.Hidden = False
[47:48].EntireRow.Hidden = False
End Select
End Sub