Hi all,
please could you help me update this button code.
Sub Commission()
Dim r As Range, c As Range
Set r = Range("E32:E34")
Application.ScreenUpdating = False
For Each c In r
If c.EntireRow.Hidden = True Then
c.EntireRow.Hidden = False
Else
If Len(c.Text) = 0 Then
c.EntireRow.Hidden = True
Else
c.EntireRow.Hidden = False
End If
End If
Next c
Application.ScreenUpdating = True
End Sub
I would like to hide empty cell - depending where I enter the value.
(if I entered value in cell E32 hide empty row E33 and show result E34 and reverse. If both cells are empty hide all rows)
please could you help me update this button code.
Sub Commission()
Dim r As Range, c As Range
Set r = Range("E32:E34")
Application.ScreenUpdating = False
For Each c In r
If c.EntireRow.Hidden = True Then
c.EntireRow.Hidden = False
Else
If Len(c.Text) = 0 Then
c.EntireRow.Hidden = True
Else
c.EntireRow.Hidden = False
End If
End If
Next c
Application.ScreenUpdating = True
End Sub
I would like to hide empty cell - depending where I enter the value.
(if I entered value in cell E32 hide empty row E33 and show result E34 and reverse. If both cells are empty hide all rows)