Hi all!
Hope you can help me improve presented macro. Below you can see code which firstly unhides rows and then hides the blank ones. My question is, how can I run it automatically whenever let's say cell A1 changes?
Thanks in advance!
Hope you can help me improve presented macro. Below you can see code which firstly unhides rows and then hides the blank ones. My question is, how can I run it automatically whenever let's say cell A1 changes?
Code:
Sub ShowAndHide ()
Range("A5:A10").EntireRow.Hidden = False
Dim cell As Variant
For Each cell In Range("A5:A10")
If cell.Value > "" Then
cell.EntireRow.Hidden = False
Else
cell.EntireRow.Hidden = True
End If
Next cell
End Sub
Thanks in advance!